From 8c633adb8eafd13958417de31e1b51d379ce2029 Mon Sep 17 00:00:00 2001 From: NavidK0 Date: Wed, 15 Jul 2015 08:33:06 -0400 Subject: [PATCH] Fixed some more permissions related things --- .../disguise/commands/LibsDisguisesCommand.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/main/java/me/libraryaddict/disguise/commands/LibsDisguisesCommand.java b/src/main/java/me/libraryaddict/disguise/commands/LibsDisguisesCommand.java index 96bbd2aa..969c2ddd 100644 --- a/src/main/java/me/libraryaddict/disguise/commands/LibsDisguisesCommand.java +++ b/src/main/java/me/libraryaddict/disguise/commands/LibsDisguisesCommand.java @@ -11,7 +11,6 @@ public class LibsDisguisesCommand implements CommandExecutor { @Override public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { - if (!sender.hasPermission("libsdisguises.reload")) { if (args.length == 0) { sender.sendMessage(ChatColor.DARK_GREEN + "This server is running " @@ -20,15 +19,18 @@ public class LibsDisguisesCommand implements CommandExecutor { + " by libraryaddict, maintained by NavidK0.\n" + "Use /libsdisguises reload to reload the config. All disguises will be blown by doing this."); } else if (args.length > 0) { - if (args[0].equalsIgnoreCase("reload")) { - LibsDisguises.instance.reload(); - sender.sendMessage(ChatColor.GREEN + "[LibsDisguises] Reloaded config."); - return true; + if (!sender.hasPermission("libsdisguises.reload")) { + if (args[0].equalsIgnoreCase("reload")) { + LibsDisguises.instance.reload(); + sender.sendMessage(ChatColor.GREEN + "[LibsDisguises] Reloaded config."); + return true; + } else { + sender.sendMessage(ChatColor.RED + "[LibsDisguises] That command doesn't exist!"); + } } else { - sender.sendMessage(ChatColor.RED + "[LibsDisguises] That command doesn't exist!"); + sender.sendMessage(ChatColor.RED + "You are forbidden to use this command."); } } - } return true; } }