Made usage for the command

This commit is contained in:
Faris Rehman 2014-05-20 22:20:14 +01:00
parent 4194a09c86
commit 482ea412b2
1 changed files with 6 additions and 2 deletions

View File

@ -23,8 +23,12 @@ public class Toggle implements CommandExecutor {
if (sender instanceof Player) {
Player player = (Player) sender;
if (Permission.has(player, Permission.NOTIFY_TOGGLE)) {
if (setIgnoring(player, !toggledPlayers.contains(player.getName()))) player.sendMessage(Messages.TOGGLE_MESSAGES_OFF);
else player.sendMessage(Messages.TOGGLE_MESSAGES_ON);
if (args.length == 0) {
if (setIgnoring(player, !toggledPlayers.contains(player.getName()))) player.sendMessage(Messages.TOGGLE_MESSAGES_OFF);
else player.sendMessage(Messages.TOGGLE_MESSAGES_ON);
} else {
return false;
}
} else {
player.sendMessage(Messages.ACCESS_DENIED);
}