mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-27 12:38:40 +01:00
Made usage for the command
This commit is contained in:
parent
4194a09c86
commit
482ea412b2
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user