diff --git a/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java b/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java index 646688a3f..8f38cb0ac 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java @@ -807,7 +807,17 @@ public class PlayerEvents extends PlotListener implements Listener { if (!PS.get().hasPlotArea(world)) { return; } - if (BukkitUtil.getLocation(event.getBlock().getLocation()).getPlotArea() != null) { + Location location = BukkitUtil.getLocation(event.getBlock().getLocation()); + PlotArea area = location.getPlotArea(); + if (area == null) { + return; + } + Plot plot = area.getOwnedPlot(location); + if (plot == null) { + event.setCancelled(true); + return; + } + if (!Flags.FROST_WALKER.isTrue(plot)) { event.setCancelled(true); } } diff --git a/Core/src/main/java/com/intellectualcrafters/plot/flag/Flags.java b/Core/src/main/java/com/intellectualcrafters/plot/flag/Flags.java index 7df35cd50..fa167fd0f 100644 --- a/Core/src/main/java/com/intellectualcrafters/plot/flag/Flags.java +++ b/Core/src/main/java/com/intellectualcrafters/plot/flag/Flags.java @@ -54,6 +54,7 @@ public final class Flags { public static final BooleanFlag ICE_MELT = new BooleanFlag("ice-melt"); public static final BooleanFlag FIRE_SPREAD = new BooleanFlag("fire-spread"); public static final BooleanFlag BLOCK_BURN = new BooleanFlag("block-burn"); + public static final BooleanFlag FROST_WALKER = new BooleanFlag("frost-walker"); public static final BooleanFlag BLOCK_IGNITION = new BooleanFlag("block-ignition"); public static final BooleanFlag SOIL_DRY = new BooleanFlag("soil-dry"); public static final StringListFlag BLOCKED_CMDS = new StringListFlag("blocked-cmds");