fix blacklisted blocks being pulled by sticky piston

This commit is contained in:
triagonal 2020-08-21 23:00:18 +10:00
parent def5f2155d
commit 6875fa4c7e
1 changed files with 5 additions and 3 deletions

View File

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