should be fixed now.

This commit is contained in:
boy0001 2014-10-24 00:41:57 +11:00
parent 3fd51a5658
commit 2ffb2d08a6
2 changed files with 7 additions and 5 deletions

View File

@ -28,7 +28,10 @@ public class Flag {
throw new IllegalArgumentException("Value must be <= 48 characters");
}
this.key = key;
this.value = value;
this.value = key.parseValue(value);
if (this.value==null) {
throw new IllegalArgumentException(key.getValueDesc());
}
}
/**

View File

@ -91,13 +91,13 @@ public class Set extends SubCommand {
return false;
}
AbstractFlag af = new AbstractFlag("");
AbstractFlag af;
try {
af = new AbstractFlag(args[1].toLowerCase());
af = FlagManager.getFlag(args[1].toLowerCase());
}
catch (Exception e) {
af = new AbstractFlag(args[1].toLowerCase());
}
if (!FlagManager.getFlags().contains(af) && ((PlotMain.worldGuardListener == null) || !PlotMain.worldGuardListener.str_flags.contains(args[1].toLowerCase()))) {
@ -141,7 +141,6 @@ public class Set extends SubCommand {
try {
String value = StringUtils.join(Arrays.copyOfRange(args, 2, args.length), " ");
value = af.parseValue(value);
if (value==null) {
PlayerFunctions.sendMessage(plr, af.getValueDesc());
return false;