mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2024-11-23 18:45:31 +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) {
|
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 (args.length == 0) {
|
||||||
if (setIgnoring(player, !toggledPlayers.contains(player.getName()))) player.sendMessage(Messages.TOGGLE_MESSAGES_OFF);
|
if (setIgnoring(player, !toggledPlayers.contains(player.getName()))) player.sendMessage(Messages.TOGGLE_MESSAGES_OFF);
|
||||||
else player.sendMessage(Messages.TOGGLE_MESSAGES_ON);
|
else player.sendMessage(Messages.TOGGLE_MESSAGES_ON);
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
player.sendMessage(Messages.ACCESS_DENIED);
|
player.sendMessage(Messages.ACCESS_DENIED);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user