diff --git a/src/main/java/world/bentobox/bentobox/listeners/flags/protection/ShearingListener.java b/src/main/java/world/bentobox/bentobox/listeners/flags/protection/ShearingListener.java index e35c370ee..0118bac5f 100644 --- a/src/main/java/world/bentobox/bentobox/listeners/flags/protection/ShearingListener.java +++ b/src/main/java/world/bentobox/bentobox/listeners/flags/protection/ShearingListener.java @@ -4,6 +4,7 @@ import org.bukkit.event.EventHandler; import org.bukkit.event.EventPriority; import org.bukkit.event.player.PlayerShearEntityEvent; +import io.papermc.paper.event.block.PlayerShearBlockEvent; import world.bentobox.bentobox.api.flags.FlagListener; import world.bentobox.bentobox.lists.Flags; @@ -20,4 +21,10 @@ public class ShearingListener extends FlagListener { checkIsland(e, e.getPlayer(), e.getEntity().getLocation(), Flags.SHEARING); } + // Block shearing - paper only + @EventHandler(priority = EventPriority.LOW) + public void onShearBlock(final PlayerShearBlockEvent e) { + checkIsland(e, e.getPlayer(), e.getBlock().getLocation(), Flags.SHEARING); + } + }