Fix blacklisted blocks being pulled by pistons (#3610)

Closes #3609.
This commit is contained in:
MD 2020-08-21 16:31:34 +01:00 committed by GitHub
commit 2c462106bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 4 deletions

View File

@ -992,7 +992,7 @@ protect:
# Which blocks should people be prevented from breaking? # Which blocks should people be prevented from breaking?
break: break:
# Which blocks should not be pushed by pistons? # Which blocks should not be moved by pistons?
piston: piston:
# Which blocks should not be dispensed by dispensers # Which blocks should not be dispensed by dispensers

View File

@ -277,9 +277,11 @@ public class EssentialsAntiBuildListener implements Listener {
if (!event.isSticky()) { if (!event.isSticky()) {
return; return;
} }
final Block block = event.getBlock(); for (Block block : event.getBlocks()) {
if (prot.checkProtectionItems(AntiBuildConfig.blacklist_piston, block.getType())) { if (prot.checkProtectionItems(AntiBuildConfig.blacklist_piston, block.getType())) {
event.setCancelled(true); event.setCancelled(true);
return;
}
} }
} }