mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-02-02 13:31:38 +01:00
parent
6c5380ba0b
commit
f4a3e8a936
@ -199,7 +199,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 if (DANGER_ZONE.contains(flag)) {
|
||||
} else if (DANGER_ZONE.contains(flag) && !(ProtectedRegion.GLOBAL_REGION.equals(region.getId()) && flag == Flags.PASSTHROUGH)) {
|
||||
hoverTexts.add(TextComponent.of("Setting this flag may have unintended consequences.", TextColor.RED)
|
||||
.append(TextComponent.newline())
|
||||
.append(TextComponent.of("Please read the documentation and set this flag manually if you really intend to.")
|
||||
|
@ -21,6 +21,8 @@
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
import com.google.common.annotations.Beta;
|
||||
|
||||
/**
|
||||
* Stores an Number.
|
||||
*/
|
||||
@ -37,10 +39,20 @@ protected NumberFlag(String name) {
|
||||
super(name);
|
||||
}
|
||||
|
||||
/**
|
||||
* Not recommended for public use. Will likely be moved when migrating to piston for commands.
|
||||
* @param values suggested values
|
||||
*/
|
||||
@Beta
|
||||
public void setSuggestedValues(Number[] values) {
|
||||
this.suggestions = checkNotNull(values);
|
||||
}
|
||||
|
||||
/**
|
||||
* Not recommended for public use. Will likely be moved when migrating to piston for commands.
|
||||
* @return suggested values
|
||||
*/
|
||||
@Beta
|
||||
public Number[] getSuggestedValues() {
|
||||
return suggestions;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user