Skip to content

Commit

Permalink
Fix pistons not blocking pseudo-protected blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
pop4959 committed Jun 27, 2019
1 parent 409e204 commit cdc00ed
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions src/main/java/com/griefcraft/listeners/LWCBlockListener.java
Expand Up @@ -304,12 +304,10 @@ public void onBlockPistonRetract(BlockPistonRetractEvent event) {
}
LWC lwc = this.plugin.getLWC();
for (Block block : event.getBlocks()) {
if (lwc.isProtectable(block)) {
Protection protection = lwc.findProtection(block);
if (protection != null) {
event.setCancelled(true);
return;
}
Protection protection = lwc.findProtection(block);
if (protection != null) {
event.setCancelled(true);
return;
}
}
}
Expand All @@ -321,12 +319,10 @@ public void onBlockPistonExtend(BlockPistonExtendEvent event) {
}
LWC lwc = this.plugin.getLWC();
for (Block block : event.getBlocks()) {
if (lwc.isProtectable(block)) {
Protection protection = lwc.findProtection(block);
if (protection != null) {
event.setCancelled(true);
return;
}
Protection protection = lwc.findProtection(block);
if (protection != null) {
event.setCancelled(true);
return;
}
}
}
Expand Down

0 comments on commit cdc00ed

Please sign in to comment.