diff --git a/src/main/java/pw/yumc/Residence/commandsub/CommandSelect.java b/src/main/java/pw/yumc/Residence/commandsub/CommandSelect.java index 49f9921..7f6e4d3 100644 --- a/src/main/java/pw/yumc/Residence/commandsub/CommandSelect.java +++ b/src/main/java/pw/yumc/Residence/commandsub/CommandSelect.java @@ -36,11 +36,14 @@ public class CommandSelect extends BaseCommand { public void execute(final CommandSender sender, final Command command, final String label, final String[] args) throws CommandException { final Player player = (Player) sender; final boolean resadmin = (command != null); + if (plugin.getDeny().getStringList("world").contains(player.getWorld().getName()) && !resadmin && !player.isOp()) { + player.sendMessage("§c当前世界不允许圈地!"); + return; + } final ResidenceManager rmanager = plugin.getResidenceManager(); final Language language = plugin.getLanguage(); final PermissionGroup group = plugin.getPermissionManager().getGroup(player); final SelectionManager smanager = plugin.getSelectionManager(); - if (!group.selectCommandAccess() && !resadmin) { player.sendMessage(ChatColor.RED + language.getPhrase("SelectDiabled")); return; @@ -86,13 +89,31 @@ public class CommandSelect extends BaseCommand { case "coords": final Location playerLoc1 = smanager.getPlayerLoc1(player.getName()); if (playerLoc1 != null) { - player.sendMessage(ChatColor.GREEN + language.getPhrase("Primary.Selection") + ":" + ChatColor.AQUA + " (" + playerLoc1.getBlockX() + ", " + playerLoc1.getBlockY() + ", " - + playerLoc1.getBlockZ() + ")"); + player.sendMessage(ChatColor.GREEN + + language.getPhrase("Primary.Selection") + + ":" + + ChatColor.AQUA + + " (" + + playerLoc1.getBlockX() + + ", " + + playerLoc1.getBlockY() + + ", " + + playerLoc1.getBlockZ() + + ")"); } final Location playerLoc2 = smanager.getPlayerLoc2(player.getName()); if (playerLoc2 != null) { - player.sendMessage(ChatColor.GREEN + language.getPhrase("Secondary.Selection") + ":" + ChatColor.AQUA + " (" + playerLoc2.getBlockX() + ", " + playerLoc2.getBlockY() + ", " - + playerLoc2.getBlockZ() + ")"); + player.sendMessage(ChatColor.GREEN + + language.getPhrase("Secondary.Selection") + + ":" + + ChatColor.AQUA + + " (" + + playerLoc2.getBlockX() + + ", " + + playerLoc2.getBlockY() + + ", " + + playerLoc2.getBlockZ() + + ")"); } return; case "chunk":