mirror of
https://e.coding.net/circlecloud/Residence.git
synced 2025-11-24 21:46:16 +00:00
remove CheckWorld and update to 2.8.0.3...
Signed-off-by: j502647092 <jtb1@163.com>
This commit is contained in:
@@ -11,7 +11,6 @@ import com.bekvon.bukkit.residence.commandsub.CommandArea;
|
||||
import com.bekvon.bukkit.residence.commandsub.CommandBank;
|
||||
import com.bekvon.bukkit.residence.commandsub.CommandCheck;
|
||||
import com.bekvon.bukkit.residence.commandsub.CommandCheckSelf;
|
||||
import com.bekvon.bukkit.residence.commandsub.CommandCheckWorld;
|
||||
import com.bekvon.bukkit.residence.commandsub.CommandClearFlags;
|
||||
import com.bekvon.bukkit.residence.commandsub.CommandCompass;
|
||||
import com.bekvon.bukkit.residence.commandsub.CommandConfirm;
|
||||
@@ -69,7 +68,6 @@ public class CommandRes extends BaseCommand implements DefaultCommand {
|
||||
hdsubcmd.registerCommand(new CommandBank(plugin));
|
||||
hdsubcmd.registerCommand(new CommandCheck(plugin));
|
||||
hdsubcmd.registerCommand(new CommandCheckSelf(plugin));
|
||||
hdsubcmd.registerCommand(new CommandCheckWorld(plugin));
|
||||
hdsubcmd.registerCommand(new CommandClearFlags(plugin));
|
||||
hdsubcmd.registerCommand(new CommandCompass(plugin));
|
||||
hdsubcmd.registerCommand(new CommandConfirm(plugin));
|
||||
@@ -143,13 +141,10 @@ public class CommandRes extends BaseCommand implements DefaultCommand {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (args.length == 0) {
|
||||
return;
|
||||
}
|
||||
hdsubcmd.onCommand(sender, resadmin ? command : null, label, args);
|
||||
}
|
||||
|
||||
private boolean commandHelp(final String[] args, final boolean resadmin, final CommandSender sender) {
|
||||
private void commandHelp(final String[] args, final boolean resadmin, final CommandSender sender) {
|
||||
if (plugin.getHelppages() != null) {
|
||||
String helppath = "res";
|
||||
for (final String arg : args) {
|
||||
@@ -168,9 +163,7 @@ public class CommandRes extends BaseCommand implements DefaultCommand {
|
||||
}
|
||||
if (plugin.getHelppages().containesEntry(helppath)) {
|
||||
plugin.getHelppages().printHelp(sender, page, helppath);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
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 CommandCheckWorld extends BaseCommand {
|
||||
ResidenceMain plugin;
|
||||
|
||||
public CommandCheckWorld(final ResidenceMain plugin) {
|
||||
super("checkworld");
|
||||
this.plugin = plugin;
|
||||
setOnlyPlayerExecutable();
|
||||
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.getWorldFlags().getPerms(player);
|
||||
switch (args.length) {
|
||||
case 0:
|
||||
player.sendMessage("§e权限列表: ");
|
||||
perm.printFlags(player);
|
||||
return;
|
||||
case 1:
|
||||
final String flag = args[0];
|
||||
player.sendMessage("§e权限检查: §a" + flag + " " + (perm.checkValidFlag(flag, false) ? "§atrue" : "§cfalse"));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user