From 4a7552e6bed311a9334c544ff352b18ffc53dd5f Mon Sep 17 00:00:00 2001 From: Pieter12345 Date: Wed, 25 Dec 2019 04:22:29 +0100 Subject: [PATCH] Prevent pushing pistons across region borders Pistons are classified as not pushable regardless of their state, causing WorldGuard to not protect against them moving. This commit fixes that. --- .../worldguard/bukkit/listener/EventAbstractionListener.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/worldguard-bukkit/src/main/java/com/sk89q/worldguard/bukkit/listener/EventAbstractionListener.java b/worldguard-bukkit/src/main/java/com/sk89q/worldguard/bukkit/listener/EventAbstractionListener.java index d29c3b37..9a45cf01 100644 --- a/worldguard-bukkit/src/main/java/com/sk89q/worldguard/bukkit/listener/EventAbstractionListener.java +++ b/worldguard-bukkit/src/main/java/com/sk89q/worldguard/bukkit/listener/EventAbstractionListener.java @@ -357,7 +357,8 @@ public void onBlockPistonExtend(BlockPistonExtendEvent event) { for (int i = 0; i < blocks.size(); i++) { Block existing = blocks.get(i); if (existing.getPistonMoveReaction() == PistonMoveReaction.MOVE - || existing.getPistonMoveReaction() == PistonMoveReaction.PUSH_ONLY) { + || existing.getPistonMoveReaction() == PistonMoveReaction.PUSH_ONLY + || existing.getType() == Material.PISTON || existing.getType() == Material.STICKY_PISTON) { blocks.set(i, existing.getRelative(dir)); } }