mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-11-14 22:56:18 +01:00
Don't allow setting build + passthrough in the flag helper.
It masks the warning message and too many people mess this up.
This commit is contained in:
parent
96b61743b9
commit
6d25513739
@ -200,7 +200,7 @@ private <V> void appendValueChoices(TextComponent.Builder builder, Flag<V> flag,
|
||||
if (maySet) {
|
||||
if (isExplicitSet) {
|
||||
hoverTexts.add(TextComponent.of("Click to unset", TextColor.GOLD));
|
||||
} else {
|
||||
} else if (flag != Flags.BUILD && flag != Flags.PASSTHROUGH) {
|
||||
hoverTexts.add(TextComponent.of("Click to set", TextColor.GOLD));
|
||||
}
|
||||
}
|
||||
@ -221,7 +221,7 @@ private <V> void appendValueChoices(TextComponent.Builder builder, Flag<V> flag,
|
||||
HoverEvent.of(HoverEvent.Action.SHOW_TEXT, hoverBuilder.build()));
|
||||
}
|
||||
|
||||
if (maySet) {
|
||||
if (maySet && (isExplicitSet || flag != Flags.BUILD && flag != Flags.PASSTHROUGH)) {
|
||||
builder.append(choiceComponent.clickEvent(ClickEvent.of(ClickEvent.Action.RUN_COMMAND,
|
||||
makeCommand(flag, isExplicitSet ? "" : choice))));
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user