mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-24 18:19:03 +01:00
some fixes for /region flag
This commit is contained in:
parent
dcd379bce7
commit
23fa7a89ad
@ -81,6 +81,7 @@ public boolean handle(CommandSender sender, String senderName, String command, S
|
||||
|
||||
if (nfo == null) {
|
||||
sender.sendMessage(ChatColor.RED + "Unknown flag specified.");
|
||||
return true;
|
||||
}
|
||||
|
||||
boolean validValue = false;
|
||||
@ -158,6 +159,7 @@ public boolean handle(CommandSender sender, String senderName, String command, S
|
||||
|
||||
} else {
|
||||
player.sendMessage(ChatColor.RED + "You must set the " + nameStr + " location inside the region it belongs to.");
|
||||
return true;
|
||||
}
|
||||
|
||||
} else if (valueStr.equals("delete")) {
|
||||
@ -182,7 +184,7 @@ public boolean handle(CommandSender sender, String senderName, String command, S
|
||||
|
||||
String fullFlagname = nameStr;
|
||||
if (subnameStr != null) {
|
||||
nameStr += " " + subnameStr;
|
||||
fullFlagname += " " + subnameStr;
|
||||
}
|
||||
|
||||
if (!validValue) {
|
||||
|
@ -58,13 +58,11 @@ public static enum FlagValueType { STRING, BOOLEAN, INT, FLOAT, DOUBLE, STATE, L
|
||||
flagList.add(new FlagInfo("waterflow", null, FlagValueType.STATE, "states", "waterflow"));
|
||||
flagList.add(new FlagInfo("iconomy", "buyable", FlagValueType.BOOLEAN, "iconomy", "buyable"));
|
||||
flagList.add(new FlagInfo("iconomy", "price", FlagValueType.INT, "iconomy", "price"));
|
||||
flagList.add(new FlagInfo("spawn", "", FlagValueType.LOCATION, "spawn", ""));
|
||||
flagList.add(new FlagInfo("teleport", "", FlagValueType.LOCATION, "teleport", ""));
|
||||
flagList.add(new FlagInfo("spawn", "*", FlagValueType.LOCATION, "spawn", ""));
|
||||
flagList.add(new FlagInfo("teleport", "*", FlagValueType.LOCATION, "teleport", ""));
|
||||
}
|
||||
|
||||
public static FlagInfo getFlagInfo(String name, String subName) {
|
||||
|
||||
System.out.println(name + " " + subName);
|
||||
|
||||
for (FlagInfo nfo : flagList) {
|
||||
if (name.equals(nfo.name)) {
|
||||
|
Loading…
Reference in New Issue
Block a user