mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 14:46:45 +01:00
should be fixed now.
This commit is contained in:
parent
3fd51a5658
commit
2ffb2d08a6
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user