Protect against brushing

Fixes #2138
This commit is contained in:
tastybento 2023-06-24 11:31:14 -07:00
parent 2b4e1dd5eb
commit 74e053ef8a
1 changed files with 7 additions and 0 deletions

View File

@ -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))
{