mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2025-01-10 10:28:21 +01:00
Merge pull request #2147 from BentoBoxWorld/suspicious_brushing
Protect against brushing
This commit is contained in:
commit
4b0c5ec894
@ -7,6 +7,7 @@ import org.bukkit.Location;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Tag;
|
||||
import org.bukkit.block.Block;
|
||||
import org.bukkit.block.BrushableBlock;
|
||||
import org.bukkit.block.Sign;
|
||||
import org.bukkit.block.data.Waterlogged;
|
||||
import org.bukkit.entity.Player;
|
||||
@ -98,6 +99,12 @@ public class BlockInteractionListener extends FlagListener
|
||||
this.checkIsland(e, player, loc, Flags.FLOWER_POT);
|
||||
return;
|
||||
}
|
||||
|
||||
if (block.getState() instanceof BrushableBlock bb && BlockInteractionListener.holds(player, Material.BRUSH)) {
|
||||
// Protect this using break blocks flag for now. Maybe in the future it can have its own flag.
|
||||
this.checkIsland(e, player, loc, Flags.BREAK_BLOCKS);
|
||||
return;
|
||||
}
|
||||
|
||||
if (Tag.ANVIL.isTagged(type))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user