From 98b7a84119633b2be5dca66dea3e4ee76ecda922 Mon Sep 17 00:00:00 2001 From: Jesse Boyd Date: Thu, 17 May 2018 14:50:47 +1000 Subject: [PATCH] Fixes #1483 --- .../java/com/plotsquared/bukkit/listeners/PlayerEvents.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 d4897be3b..a6d5497ef 100644 --- a/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java +++ b/Bukkit/src/main/java/com/plotsquared/bukkit/listeners/PlayerEvents.java @@ -1230,8 +1230,9 @@ public class PlayerEvents extends PlotListener implements Listener { Plot plot = area.getOwnedPlot(location); if (this.pistonBlocks) { try { + BlockFace dir = event.getDirection(); for (Block pulled : event.getBlocks()) { - location = BukkitUtil.getLocation(pulled.getLocation()); + location = BukkitUtil.getLocation(pulled.getLocation().add(dir.getModX(), dir.getModY(), dir.getModZ())); if (!area.contains(location.getX(), location.getZ())) { event.setCancelled(true); return;