mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 07:06:44 +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());
|
MainUtil.sendMessage(player, "&c" + flag.getValueDescription());
|
||||||
return false;
|
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);
|
boolean result = plot.setFlag(flag, parsed);
|
||||||
if (!result) {
|
if (!result) {
|
||||||
MainUtil.sendMessage(player, Captions.FLAG_NOT_ADDED);
|
MainUtil.sendMessage(player, Captions.FLAG_NOT_ADDED);
|
||||||
|
Loading…
Reference in New Issue
Block a user