mirror of
https://e.coding.net/circlecloud/Residence.git
synced 2025-11-24 21:46:16 +00:00
@@ -17,15 +17,21 @@ public class CommandCheckSelf extends BaseCommand {
|
|||||||
super("checkself");
|
super("checkself");
|
||||||
this.plugin = plugin;
|
this.plugin = plugin;
|
||||||
setOnlyPlayerExecutable();
|
setOnlyPlayerExecutable();
|
||||||
setMinimumArguments(1);
|
setPossibleArguments("[权限]");
|
||||||
setPossibleArguments("<权限>");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(final CommandSender sender, final Command command, final String label, final String[] args) throws CommandException {
|
public void execute(final CommandSender sender, final Command command, final String label, final String[] args) throws CommandException {
|
||||||
final Player player = (Player) sender;
|
final Player player = (Player) sender;
|
||||||
final FlagPermissions perm = plugin.getPermsByLocForPlayer(player.getLocation(), player);
|
final FlagPermissions perm = plugin.getPermsByLocForPlayer(player.getLocation(), player);
|
||||||
perm.checkValidFlag(args[0], false);
|
switch (args.length) {
|
||||||
|
case 0:
|
||||||
|
player.sendMessage("§e权限列表: ");
|
||||||
|
perm.printFlags(player);
|
||||||
|
case 1:
|
||||||
|
final String flag = args[0];
|
||||||
|
player.sendMessage("§e权限检查: §a" + flag + " " + (perm.checkValidFlag(flag, false) ? "§atrue" : "§cfalse"));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user