From 7301a60aa4e9df34f14a6321e01ba2208a2cc70d Mon Sep 17 00:00:00 2001 From: NavidK0 Date: Wed, 15 Jul 2015 08:25:15 -0400 Subject: [PATCH] Fixed incorrect permission for /vsd a.k.a /disguiseviewself --- .../disguise/commands/DisguiseViewSelf.java | 16 ++++++---------- .../disguise/commands/LibsDisguisesCommand.java | 12 ++++++------ 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/src/main/java/me/libraryaddict/disguise/commands/DisguiseViewSelf.java b/src/main/java/me/libraryaddict/disguise/commands/DisguiseViewSelf.java index 7a354951..b735645c 100644 --- a/src/main/java/me/libraryaddict/disguise/commands/DisguiseViewSelf.java +++ b/src/main/java/me/libraryaddict/disguise/commands/DisguiseViewSelf.java @@ -19,17 +19,13 @@ public class DisguiseViewSelf implements CommandExecutor { sender.sendMessage(ChatColor.RED + "You may not use this command from the console!"); return true; } - if (sender.hasPermission("libsdisguises.viewself")) { - Player player = (Player) sender; - if (DisguiseAPI.isViewSelfToggled(player)) { - DisguiseAPI.setViewDisguiseToggled(player, false); - sender.sendMessage(ChatColor.GREEN + "Toggled viewing own disguise off!"); - } else { - DisguiseAPI.setViewDisguiseToggled(player, true); - sender.sendMessage(ChatColor.GREEN + "Toggled viewing own disguise on!"); - } + Player player = (Player) sender; + if (DisguiseAPI.isViewSelfToggled(player)) { + DisguiseAPI.setViewDisguiseToggled(player, false); + sender.sendMessage(ChatColor.GREEN + "Toggled viewing own disguise off!"); } else { - sender.sendMessage(ChatColor.RED + "You are forbidden to use this command."); + DisguiseAPI.setViewDisguiseToggled(player, true); + sender.sendMessage(ChatColor.GREEN + "Toggled viewing own disguise on!"); } return true; } diff --git a/src/main/java/me/libraryaddict/disguise/commands/LibsDisguisesCommand.java b/src/main/java/me/libraryaddict/disguise/commands/LibsDisguisesCommand.java index b052433c..211ffa80 100644 --- a/src/main/java/me/libraryaddict/disguise/commands/LibsDisguisesCommand.java +++ b/src/main/java/me/libraryaddict/disguise/commands/LibsDisguisesCommand.java @@ -12,12 +12,12 @@ 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."); + 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();