mirror of
https://e.coding.net/circlecloud/Residence.git
synced 2025-11-24 21:46:16 +00:00
@@ -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 {
|
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 boolean resadmin = (command != null);
|
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 ResidenceManager rmanager = plugin.getResidenceManager();
|
||||||
final Language language = plugin.getLanguage();
|
final Language language = plugin.getLanguage();
|
||||||
final PermissionGroup group = plugin.getPermissionManager().getGroup(player);
|
final PermissionGroup group = plugin.getPermissionManager().getGroup(player);
|
||||||
final SelectionManager smanager = plugin.getSelectionManager();
|
final SelectionManager smanager = plugin.getSelectionManager();
|
||||||
|
|
||||||
if (!group.selectCommandAccess() && !resadmin) {
|
if (!group.selectCommandAccess() && !resadmin) {
|
||||||
player.sendMessage(ChatColor.RED + language.getPhrase("SelectDiabled"));
|
player.sendMessage(ChatColor.RED + language.getPhrase("SelectDiabled"));
|
||||||
return;
|
return;
|
||||||
@@ -86,13 +89,31 @@ public class CommandSelect extends BaseCommand {
|
|||||||
case "coords":
|
case "coords":
|
||||||
final Location playerLoc1 = smanager.getPlayerLoc1(player.getName());
|
final Location playerLoc1 = smanager.getPlayerLoc1(player.getName());
|
||||||
if (playerLoc1 != null) {
|
if (playerLoc1 != null) {
|
||||||
player.sendMessage(ChatColor.GREEN + language.getPhrase("Primary.Selection") + ":" + ChatColor.AQUA + " (" + playerLoc1.getBlockX() + ", " + playerLoc1.getBlockY() + ", "
|
player.sendMessage(ChatColor.GREEN
|
||||||
+ playerLoc1.getBlockZ() + ")");
|
+ language.getPhrase("Primary.Selection")
|
||||||
|
+ ":"
|
||||||
|
+ ChatColor.AQUA
|
||||||
|
+ " ("
|
||||||
|
+ playerLoc1.getBlockX()
|
||||||
|
+ ", "
|
||||||
|
+ playerLoc1.getBlockY()
|
||||||
|
+ ", "
|
||||||
|
+ playerLoc1.getBlockZ()
|
||||||
|
+ ")");
|
||||||
}
|
}
|
||||||
final Location playerLoc2 = smanager.getPlayerLoc2(player.getName());
|
final Location playerLoc2 = smanager.getPlayerLoc2(player.getName());
|
||||||
if (playerLoc2 != null) {
|
if (playerLoc2 != null) {
|
||||||
player.sendMessage(ChatColor.GREEN + language.getPhrase("Secondary.Selection") + ":" + ChatColor.AQUA + " (" + playerLoc2.getBlockX() + ", " + playerLoc2.getBlockY() + ", "
|
player.sendMessage(ChatColor.GREEN
|
||||||
+ playerLoc2.getBlockZ() + ")");
|
+ language.getPhrase("Secondary.Selection")
|
||||||
|
+ ":"
|
||||||
|
+ ChatColor.AQUA
|
||||||
|
+ " ("
|
||||||
|
+ playerLoc2.getBlockX()
|
||||||
|
+ ", "
|
||||||
|
+ playerLoc2.getBlockY()
|
||||||
|
+ ", "
|
||||||
|
+ playerLoc2.getBlockZ()
|
||||||
|
+ ")");
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
case "chunk":
|
case "chunk":
|
||||||
|
|||||||
Reference in New Issue
Block a user