mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-25 22:56: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");
|
throw new IllegalArgumentException("Value must be <= 48 characters");
|
||||||
}
|
}
|
||||||
this.key = key;
|
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;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
AbstractFlag af = new AbstractFlag("");
|
AbstractFlag af;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
af = new AbstractFlag(args[1].toLowerCase());
|
af = FlagManager.getFlag(args[1].toLowerCase());
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
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()))) {
|
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 {
|
try {
|
||||||
String value = StringUtils.join(Arrays.copyOfRange(args, 2, args.length), " ");
|
String value = StringUtils.join(Arrays.copyOfRange(args, 2, args.length), " ");
|
||||||
value = af.parseValue(value);
|
value = af.parseValue(value);
|
||||||
|
|
||||||
if (value==null) {
|
if (value==null) {
|
||||||
PlayerFunctions.sendMessage(plr, af.getValueDesc());
|
PlayerFunctions.sendMessage(plr, af.getValueDesc());
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user