From 76daef844041a28acbec060e197c2f6a6eef15f7 Mon Sep 17 00:00:00 2001 From: boy0001 Date: Thu, 12 Mar 2015 23:41:11 +1100 Subject: [PATCH] Fixed piston retract for pre 1.8 --- .../plot/listeners/PlayerEvents.java | 13 ++++++------- 1 file changed, 6 insertions(+), 7 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 703818a02..eadeb29ac 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java @@ -546,13 +546,12 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi } Plot plot = MainUtil.getPlot(loc); if (plot != null) { - for (final Block b : event.getBlocks()) { - Location bloc = BukkitUtil.getLocation(b.getLocation()); - Plot newPlot = MainUtil.getPlot(bloc); - if (!plot.equals(newPlot)) { - event.setCancelled(true); - return; - } + final Block b = event.getRetractLocation().getBlock(); + Location bloc = BukkitUtil.getLocation(b.getLocation()); + Plot newPlot = MainUtil.getPlot(bloc); + if (!plot.equals(newPlot)) { + event.setCancelled(true); + return; } } }