mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-09 01:48:24 +01:00
parent
ee3b0bfcc2
commit
1fd4a9043f
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user