mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
Fix /plot flag set
allowing for invalid flag values. (Fixes #2519)
This commit is contained in:
parent
cb52ee8cfb
commit
2e15934666
@ -163,6 +163,11 @@ public class FlagCmd extends SubCommand {
|
||||
MainUtil.sendMessage(player, "&c" + flag.getValueDescription());
|
||||
return false;
|
||||
}
|
||||
if (flag instanceof ListFlag) {
|
||||
if (!(parsed instanceof Collection) || ((Collection) parsed).isEmpty()) {
|
||||
return !MainUtil.sendMessage(player, Captions.FLAG_NOT_ADDED);
|
||||
}
|
||||
}
|
||||
boolean result = plot.setFlag(flag, parsed);
|
||||
if (!result) {
|
||||
MainUtil.sendMessage(player, Captions.FLAG_NOT_ADDED);
|
||||
|
Loading…
Reference in New Issue
Block a user