mirror of
https://github.com/TotalFreedomMC/TF-PlotSquared.git
synced 2025-08-05 20:13:08 +00:00
Fix /plot flag set
allowing for invalid flag values. (Fixes #2519)
This commit is contained in:
parent
cb52ee8cfb
commit
2e15934666
1 changed files with 5 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue