From 421a7dfb99461e3d8d0ecf4dabf9e7aa2bcd6379 Mon Sep 17 00:00:00 2001 From: boy0001 Date: Sat, 14 Mar 2015 18:57:58 +1100 Subject: [PATCH] Fixed piston retract --- .../com/intellectualcrafters/plot/listeners/PlayerEvents.java | 3 +-- 1 file changed, 1 insertion(+), 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 eadeb29ac..9f2b355da 100644 --- a/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java +++ b/PlotSquared/src/main/java/com/intellectualcrafters/plot/listeners/PlayerEvents.java @@ -546,8 +546,7 @@ public class PlayerEvents extends com.intellectualcrafters.plot.listeners.PlotLi } Plot plot = MainUtil.getPlot(loc); if (plot != null) { - final Block b = event.getRetractLocation().getBlock(); - Location bloc = BukkitUtil.getLocation(b.getLocation()); + Location bloc = BukkitUtil.getLocation(block.getLocation().subtract(block.getRelative(event.getDirection()).getRelative(event.getDirection()).getLocation())); Plot newPlot = MainUtil.getPlot(bloc); if (!plot.equals(newPlot)) { event.setCancelled(true);