Skip to content

Commit

Permalink
bug fix ´/market´perm message
Browse files Browse the repository at this point in the history
- fixed perm mesage for ´/market´when player not having the permission
  • Loading branch information
MRollin03 committed Sep 26, 2024
1 parent 6ed3a0e commit a20d2fe
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package dk.arasbuilds.jobactions.commands;

import dk.arasbuilds.jobactions.JobActions;
import dk.arasbuilds.jobactions.events.gui.MarketGUI;
import org.bukkit.ChatColor;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
Expand All @@ -14,10 +14,13 @@ public boolean onCommand(CommandSender commandSender, Command command, String s,
return false;
}
Player player = (Player) commandSender;
if (player.hasPermission("market")) {
MarketGUI.Display(player);
if (!player.hasPermission("market")) {
player.sendMessage(ChatColor.RED + "you don't have permission ´market´");
return true;
}
return false;

MarketGUI.Display(player);
return true;

}
}

0 comments on commit a20d2fe

Please sign in to comment.