From 91a8aefceea5a1d3f876344b80f4a7bdf33f0278 Mon Sep 17 00:00:00 2001 From: NavidK0 Date: Wed, 15 Jul 2015 08:27:45 -0400 Subject: [PATCH] Fixed incorrect permission for /vsd a.k.a /disguiseviewself --- .../commands/LibsDisguisesCommand.java | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/src/main/java/me/libraryaddict/disguise/commands/LibsDisguisesCommand.java b/src/main/java/me/libraryaddict/disguise/commands/LibsDisguisesCommand.java index 211ffa80..96bbd2aa 100644 --- a/src/main/java/me/libraryaddict/disguise/commands/LibsDisguisesCommand.java +++ b/src/main/java/me/libraryaddict/disguise/commands/LibsDisguisesCommand.java @@ -11,20 +11,22 @@ public class LibsDisguisesCommand implements CommandExecutor { @Override public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { - if (args.length == 0) { - sender.sendMessage(ChatColor.DARK_GREEN - + "This server is running " - + "Lib's Disguises v." - + Bukkit.getPluginManager().getPlugin("LibsDisguises").getDescription().getVersion() - + " 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; - } else { - sender.sendMessage(ChatColor.RED + "[LibsDisguises] That command doesn't exist!"); + if (!sender.hasPermission("libsdisguises.reload")) { + if (args.length == 0) { + sender.sendMessage(ChatColor.DARK_GREEN + + "This server is running " + + "Lib's Disguises v." + + Bukkit.getPluginManager().getPlugin("LibsDisguises").getDescription().getVersion() + + " 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; + } else { + sender.sendMessage(ChatColor.RED + "[LibsDisguises] That command doesn't exist!"); + } } } return true;