From be8db522fd37c33cc599ced2d0134770c47d9725 Mon Sep 17 00:00:00 2001 From: boy0001 Date: Wed, 15 Apr 2015 17:42:28 +1000 Subject: [PATCH] Added IsPlotFlagFalse to FlagManager --- .../intellectualcrafters/plot/flag/FlagManager.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/flag/FlagManager.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/flag/FlagManager.java index 31777b2cf..4a342eb6b 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/flag/FlagManager.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/flag/FlagManager.java @@ -115,6 +115,17 @@ public class FlagManager { } return false; } + + public static boolean isPlotFlagFalse(final Plot plot, final String strFlag) { + final Flag flag = getPlotFlag(plot, strFlag); + if (flag == null) { + return false; + } + if (flag.getValue() instanceof Boolean) { + return !(boolean) flag.getValue(); + } + return false; + } /** * Get the value of a flag for a plot (ignores flag defaults)