Skip to content

Commit

Permalink
Fixed NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
Foulest committed Oct 31, 2024
1 parent afcccfe commit bc11c6a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/net/foulest/kitpvp/cmds/BountyCmd.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ public static void onCommand(@NotNull CommandArgs args) {

UUID benefactorUUID = playerData.getBenefactor();
Player benefactor = Bukkit.getPlayer(benefactorUUID);
String benefactorName = benefactor.getName();

// Checks if the bounties feature is enabled.
if (!Settings.bountiesEnabled) {
Expand All @@ -76,6 +75,7 @@ public static void onCommand(@NotNull CommandArgs args) {
MessageUtil.messagePlayer(player, " &aYou currently don't have a");
MessageUtil.messagePlayer(player, " &abounty on your head.");
} else {
String benefactorName = benefactor.getName();
MessageUtil.messagePlayer(player, " &cYou currently have a &e$" + activeBounty + " &cbounty");
MessageUtil.messagePlayer(player, " &con your head set by &e" + benefactorName + "&c.");
}
Expand Down

0 comments on commit bc11c6a

Please sign in to comment.