Fixed incorrect permission for /vsd a.k.a /disguiseviewself

This commit is contained in:
NavidK0 2015-07-15 08:25:15 -04:00
parent 8c0e61680b
commit 7301a60aa4
2 changed files with 12 additions and 16 deletions

View File

@ -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;
}

View File

@ -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();