From 4dce8059780e08bb14d3ea178439f3e9957081ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20S=C3=B6derberg?= Date: Sun, 16 Feb 2020 15:59:56 +0100 Subject: [PATCH] Move getExample implementation to BooleanFlag --- .../plotsquared/plot/flags/implementations/DenyExitFlag.java | 4 ---- .../plotsquared/plot/flags/implementations/ExplosionFlag.java | 4 ---- .../plotsquared/plot/flags/implementations/FlightFlag.java | 4 ---- .../plot/flags/implementations/UntrustedVisitFlag.java | 4 ---- .../plotsquared/plot/flags/types/BooleanFlag.java | 4 ++++ 5 files changed, 4 insertions(+), 16 deletions(-) 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 d3181c9c2..45dfedb19 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 @@ -12,10 +12,6 @@ public class DenyExitFlag extends BooleanFlag { super(value, Captions.FLAG_DESCRIPTION_DENY_EXIT); } - @Override public String getExample() { - return "true"; - } - @Override protected DenyExitFlag flagOf(@NotNull Boolean value) { return new DenyExitFlag(value); } diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/ExplosionFlag.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/ExplosionFlag.java index 9233a266b..c9dfe320a 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/ExplosionFlag.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/ExplosionFlag.java @@ -13,10 +13,6 @@ public class ExplosionFlag extends BooleanFlag { super(value, Captions.FLAG_DESCRIPTION_EXPLOSION); } - @Override public String getExample() { - return "true"; - } - @Override protected ExplosionFlag flagOf(@NotNull Boolean value) { return value ? EXPLOSION_TRUE : EXPLOSION_FALSE; } diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/FlightFlag.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/FlightFlag.java index e14fd8e5f..ffe9df063 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/FlightFlag.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/FlightFlag.java @@ -12,10 +12,6 @@ public class FlightFlag extends BooleanFlag { super(value, Captions.FLAG_DESCRIPTION_FLIGHT); } - @Override public String getExample() { - return "true"; - } - @Override protected FlightFlag flagOf(@NotNull Boolean value) { return new FlightFlag(value); } diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/UntrustedVisitFlag.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/UntrustedVisitFlag.java index b0628cf20..279144f5c 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/UntrustedVisitFlag.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/implementations/UntrustedVisitFlag.java @@ -12,10 +12,6 @@ public class UntrustedVisitFlag extends BooleanFlag { super(value, Captions.FLAG_DESCRIPTION_UNTRUSTED); } - @Override public String getExample() { - return ""; - } - @Override protected UntrustedVisitFlag flagOf(@NotNull Boolean value) { return new UntrustedVisitFlag(value); } diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/types/BooleanFlag.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/types/BooleanFlag.java index ab7791372..e6fcc9bd9 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/types/BooleanFlag.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flags/types/BooleanFlag.java @@ -49,6 +49,10 @@ public abstract class BooleanFlag> extends PlotFl return this.flagOf(getValue() || newValue); } + @Override public String getExample() { + return "true"; + } + @Override public String toString() { return this.getValue().toString(); }