mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-06-28 03:34:43 +02:00
Cleaned up a few things in PartyCommand - removed unnecessary else
statements & function args, removed accidental usage of Bukkit.getServer() command, fixed some spacing issues. Added new CommandHelper function to take a player when checking permissions to avoid double-checking when it's already been verified that the sender is a player.
This commit is contained in:
@ -33,6 +33,15 @@ public final class CommandHelper {
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean noCommandPermissions(Player player, String permission) {
|
||||
if (!Permissions.hasPermission(player, permission)) {
|
||||
player.sendMessage(LocaleLoader.getString("mcMMO.NoPermission"));
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean noConsoleUsage(CommandSender sender) {
|
||||
if (!(sender instanceof Player)) {
|
||||
sender.sendMessage(LocaleLoader.getString("Commands.NoConsole"));
|
||||
|
Reference in New Issue
Block a user