From feda094273a95b53401c188dd0f0b7df75132354 Mon Sep 17 00:00:00 2001 From: NotMyFault Date: Sat, 20 Jul 2019 01:29:30 +0200 Subject: [PATCH] Add kelp-grow flag Simply as the name says, add a controlled way to let kelp grow. --- .../plotsquared/bukkit/listeners/PlayerEvents.java | 5 +++++ .../intellectualsites/plotsquared/plot/flag/Flags.java | 1 + 2 files changed, 6 insertions(+) diff --git a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/PlayerEvents.java b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/PlayerEvents.java index f7210f108..0d936b469 100644 --- a/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/PlayerEvents.java +++ b/Bukkit/src/main/java/com/github/intellectualsites/plotsquared/bukkit/listeners/PlayerEvents.java @@ -1223,6 +1223,11 @@ import java.util.regex.Pattern; event.setCancelled(true); } break; + case KELP: + if (Flags.KELP_GROW.isFalse(plot)) { + event.setCancelled(true); + } + break; } } diff --git a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/Flags.java b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/Flags.java index 12d9e2b06..fc203a00b 100644 --- a/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/Flags.java +++ b/Core/src/main/java/com/github/intellectualsites/plotsquared/plot/flag/Flags.java @@ -46,6 +46,7 @@ public final class Flags { public static final BooleanFlag GRASS_GROW = new BooleanFlag("grass-grow"); public static final BooleanFlag VINE_GROW = new BooleanFlag("vine-grow"); public static final BooleanFlag MYCEL_GROW = new BooleanFlag("mycel-grow"); + public static final BooleanFlag KELP_GROW = new BooleanFlag("kelp-grow"); public static final BooleanFlag DISABLE_PHYSICS = new BooleanFlag("disable-physics"); public static final BooleanFlag LIQUID_FLOW = new BooleanFlag("liquid-flow"); public static final BooleanFlag SNOW_MELT = new BooleanFlag("snow-melt");