Fixed incorrect permission for /vsd a.k.a /disguiseviewself
This commit is contained in:
		| @@ -19,17 +19,13 @@ public class DisguiseViewSelf implements CommandExecutor { | |||||||
|             sender.sendMessage(ChatColor.RED + "You may not use this command from the console!"); |             sender.sendMessage(ChatColor.RED + "You may not use this command from the console!"); | ||||||
|             return true; |             return true; | ||||||
|         } |         } | ||||||
|         if (sender.hasPermission("libsdisguises.viewself")) { |         Player player = (Player) sender; | ||||||
|             Player player = (Player) sender; |         if (DisguiseAPI.isViewSelfToggled(player)) { | ||||||
|             if (DisguiseAPI.isViewSelfToggled(player)) { |             DisguiseAPI.setViewDisguiseToggled(player, false); | ||||||
|                 DisguiseAPI.setViewDisguiseToggled(player, false); |             sender.sendMessage(ChatColor.GREEN + "Toggled viewing own disguise off!"); | ||||||
|                 sender.sendMessage(ChatColor.GREEN + "Toggled viewing own disguise off!"); |  | ||||||
|             } else { |  | ||||||
|                 DisguiseAPI.setViewDisguiseToggled(player, true); |  | ||||||
|                 sender.sendMessage(ChatColor.GREEN + "Toggled viewing own disguise on!"); |  | ||||||
|             } |  | ||||||
|         } else { |         } 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; |         return true; | ||||||
|     } |     } | ||||||
|   | |||||||
| @@ -12,12 +12,12 @@ public class LibsDisguisesCommand implements CommandExecutor { | |||||||
|     @Override |     @Override | ||||||
|     public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { |     public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) { | ||||||
|         if (args.length == 0) { |         if (args.length == 0) { | ||||||
|         sender.sendMessage(ChatColor.DARK_GREEN |             sender.sendMessage(ChatColor.DARK_GREEN | ||||||
|                 + "This server is running " |                     + "This server is running " | ||||||
|                 + "Lib's Disguises v." |                     + "Lib's Disguises v." | ||||||
|                 + Bukkit.getPluginManager().getPlugin("LibsDisguises").getDescription().getVersion() |                     + Bukkit.getPluginManager().getPlugin("LibsDisguises").getDescription().getVersion() | ||||||
|                 + " by libraryaddict, maintained by NavidK0.\n" |                     + " by libraryaddict, maintained by NavidK0.\n" | ||||||
|                 + "Use /libsdisguises reload to reload the config. All disguises will be blown by doing this."); |                     + "Use /libsdisguises reload to reload the config. All disguises will be blown by doing this."); | ||||||
|         } else if (args.length > 0) { |         } else if (args.length > 0) { | ||||||
|             if (args[0].equalsIgnoreCase("reload")) { |             if (args[0].equalsIgnoreCase("reload")) { | ||||||
|                 LibsDisguises.instance.reload(); |                 LibsDisguises.instance.reload(); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user