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

add checkself flag command...

Signed-off-by: j502647092 <jtb1@163.com>
This commit is contained in:
j502647092
2015-10-01 23:56:11 +08:00
parent 2edf5ffc8a
commit fc502ae529
2 changed files with 33 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
package com.bekvon.bukkit.residence.commandsub;
import org.bukkit.command.Command;
import org.bukkit.command.CommandException;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import com.bekvon.bukkit.residence.ResidenceMain;
import com.bekvon.bukkit.residence.protection.FlagPermissions;
import cn.citycraft.PluginHelper.commands.BaseCommand;
public class CommandCheckSelf extends BaseCommand {
ResidenceMain plugin;
public CommandCheckSelf(final ResidenceMain plugin) {
super("checkself");
this.plugin = plugin;
setOnlyPlayerExecutable();
setMinimumArguments(1);
setPossibleArguments("<权限>");
}
@Override
public void execute(final CommandSender sender, final Command command, final String label, final String[] args) throws CommandException {
final Player player = (Player) sender;
final FlagPermissions perm = plugin.getPermsByLocForPlayer(player.getLocation(), player);
perm.checkValidFlag(args[0], false);
}
}