Skip to content
Permalink
Browse files

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.
  • Loading branch information
Pieter12345 authored and wizjany committed Dec 25, 2019
1 parent c6c0fc9 commit 4a7552e6bed311a9334c544ff352b18ffc53dd5f
@@ -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));
}
}

0 comments on commit 4a7552e

Please sign in to comment.
You can’t perform that action at this time.