Made usage for the command

This commit is contained in:
Faris Rehman 2014-05-20 22:20:14 +01:00
parent 4194a09c86
commit 482ea412b2

View File

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