From 6875fa4c7e0910a6be6515c562056578669bd0f8 Mon Sep 17 00:00:00 2001 From: triagonal Date: Fri, 21 Aug 2020 23:00:18 +1000 Subject: [PATCH 1/2] fix blacklisted blocks being pulled by sticky piston --- .../essentials/antibuild/EssentialsAntiBuildListener.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/EssentialsAntiBuild/src/com/earth2me/essentials/antibuild/EssentialsAntiBuildListener.java b/EssentialsAntiBuild/src/com/earth2me/essentials/antibuild/EssentialsAntiBuildListener.java index c12cd4735..3e626013d 100644 --- a/EssentialsAntiBuild/src/com/earth2me/essentials/antibuild/EssentialsAntiBuildListener.java +++ b/EssentialsAntiBuild/src/com/earth2me/essentials/antibuild/EssentialsAntiBuildListener.java @@ -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; + } } } From bd1e624c916471006f787009aeb27a176edcdead Mon Sep 17 00:00:00 2001 From: triagonal Date: Fri, 21 Aug 2020 23:00:56 +1000 Subject: [PATCH 2/2] clarify piston blacklist config comment --- Essentials/src/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Essentials/src/config.yml b/Essentials/src/config.yml index 1e9973dbd..98136f01f 100644 --- a/Essentials/src/config.yml +++ b/Essentials/src/config.yml @@ -992,7 +992,7 @@ protect: # Which blocks should people be prevented from breaking? break: - # Which blocks should not be pushed by pistons? + # Which blocks should not be moved by pistons? piston: # Which blocks should not be dispensed by dispensers