mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2025-02-09 00:42:00 +01:00
parent
6c5380ba0b
commit
f4a3e8a936
@ -199,7 +199,7 @@ private <V> void appendValueChoices(TextComponent.Builder builder, Flag<V> flag,
|
|||||||
if (maySet) {
|
if (maySet) {
|
||||||
if (isExplicitSet) {
|
if (isExplicitSet) {
|
||||||
hoverTexts.add(TextComponent.of("Click to unset", TextColor.GOLD));
|
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)
|
hoverTexts.add(TextComponent.of("Setting this flag may have unintended consequences.", TextColor.RED)
|
||||||
.append(TextComponent.newline())
|
.append(TextComponent.newline())
|
||||||
.append(TextComponent.of("Please read the documentation and set this flag manually if you really intend to.")
|
.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 static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
|
||||||
|
import com.google.common.annotations.Beta;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Stores an Number.
|
* Stores an Number.
|
||||||
*/
|
*/
|
||||||
@ -37,10 +39,20 @@ protected NumberFlag(String name) {
|
|||||||
super(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) {
|
public void setSuggestedValues(Number[] values) {
|
||||||
this.suggestions = checkNotNull(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() {
|
public Number[] getSuggestedValues() {
|
||||||
return suggestions;
|
return suggestions;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user