mirror of
https://github.com/EngineHub/WorldGuard.git
synced 2024-12-23 09:37:51 +01:00
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.
This commit is contained in:
parent
c6c0fc9d74
commit
4a7552e6be
@ -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));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user