From 923a78a927c1fc04370ed9680152c93ddc530c7e Mon Sep 17 00:00:00 2001 From: boy0001 Date: Fri, 20 Feb 2015 21:16:44 +1100 Subject: [PATCH] jklasdklasdkml lk;as l;asd --- .../plot/listeners/PlayerEvents.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java index a8dc0ae16..0593d9cd8 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java @@ -492,18 +492,29 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi @EventHandler(priority = EventPriority.HIGH, ignoreCancelled = true) public static void onStructureGrow(final StructureGrowEvent e) { + if (!isPlotWorld(e.getWorld().getName())) { + return; + } final List blocks = e.getBlocks(); boolean remove = false; for (int i = blocks.size() - 1; i >= 0; i--) { - if (remove || isPlotWorld(blocks.get(i).getLocation())) { + if (remove) { + e.getBlocks().remove(i); remove = true; - final Location loc = blocks.get(i).getLocation(); if (!isInPlot(loc)) { if (isPlotArea(loc)) { e.getBlocks().remove(i); } } } + else { + final Location loc = BukkitUtil.getLocation(blocks.get(i).getLocation()); + if (!isPlotArea(loc)) { + remove = true; + e.getBlocks().remove(i); + } + } + } }