1
0
mirror of https://e.coding.net/circlecloud/Residence.git synced 2025-11-24 21:46:16 +00:00

add flag list...

Signed-off-by: j502647092 <jtb1@163.com>
This commit is contained in:
j502647092
2015-10-02 00:08:52 +08:00
parent fc502ae529
commit b2216eb812

View File

@@ -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"));
}
} }
} }