From 3fce2cae1a1fe41f7807fcaa17110f52d0cf9eab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20S=C3=B6derberg?= Date: Tue, 18 Feb 2020 19:34:11 +0100 Subject: [PATCH] Invert default value for DenyExitFlag --- .../plotsquared/plot/flags/GlobalFlagContainer.java | 4 ++-- .../plotsquared/plot/flags/implementations/DenyExitFlag.java | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/GlobalFlagContainer.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/GlobalFlagContainer.java index 83040722a..134c6008e 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/GlobalFlagContainer.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/GlobalFlagContainer.java @@ -95,10 +95,9 @@ public final class GlobalFlagContainer extends FlagContainer { // Register all default flags here // Boolean flags this.addFlag(ExplosionFlag.EXPLOSION_FALSE); - this.addFlag(MusicFlag.MUSIC_FLAG_NONE); this.addFlag(FlightFlag.FLIGHT_FLAG_FALSE); this.addFlag(UntrustedVisitFlag.UNTRUSTED_VISIT_FLAG_TRUE); - this.addFlag(DenyExitFlag.DENY_EXIT_FLAG_TRUE); + this.addFlag(DenyExitFlag.DENY_EXIT_FLAG_FALSE); this.addFlag(DescriptionFlag.DESCRIPTION_FLAG_EMPTY); this.addFlag(GreetingFlag.GREETING_FLAG_EMPTY); this.addFlag(FarewellFlag.FAREWELL_FLAG_EMPTY); @@ -176,6 +175,7 @@ public final class GlobalFlagContainer extends FlagContainer { this.addFlag(GuestGamemodeFlag.GUEST_GAMEMODE_FLAG_DEFAULT); this.addFlag(BlockedCmdsFlag.BLOCKED_CMDS_FLAG_NONE); this.addFlag(KeepFlag.KEEP_FLAG_FALSE); + this.addFlag(MusicFlag.MUSIC_FLAG_NONE); // Internal flags this.addFlag(new AnalysisFlag(Collections.emptyList())); diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/DenyExitFlag.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/DenyExitFlag.java index 45dfedb19..97accde0a 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/DenyExitFlag.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/DenyExitFlag.java @@ -7,13 +7,14 @@ import org.jetbrains.annotations.NotNull; public class DenyExitFlag extends BooleanFlag { public static final DenyExitFlag DENY_EXIT_FLAG_TRUE = new DenyExitFlag(true); + public static final DenyExitFlag DENY_EXIT_FLAG_FALSE = new DenyExitFlag(false); protected DenyExitFlag(boolean value) { super(value, Captions.FLAG_DESCRIPTION_DENY_EXIT); } @Override protected DenyExitFlag flagOf(@NotNull Boolean value) { - return new DenyExitFlag(value); + return value ? DENY_EXIT_FLAG_TRUE : DENY_EXIT_FLAG_FALSE; } }