Fix USE flag being ignored for blocks considered built if used

RegionProtectionListener did not attach any flags for materials which fall under the isConsideredBuildingIfUsed category. Without this flag, the interaction would default to being denied, and changing the region USE flag did not change the behavior.

This inlcuded interactions with the following materials: REPEATER, COMPARATOR, CAKE, DRAGON_EGG
And the following tags: FLOWER_POTS, CANDLES, CANDLE_CAKES
This commit is contained in:
KK 2023-12-02 12:47:58 -06:00 committed by GitHub
parent 0a9eb447d6
commit d7b0efc3dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -254,7 +254,7 @@ public class RegionProtectionListener extends AbstractListener {
/* Saplings, etc. */
if (Materials.isConsideredBuildingIfUsed(type)) {
canUse = query.testBuild(BukkitAdapter.adapt(target), associable, combine(event));
canUse = query.testBuild(BukkitAdapter.adapt(target), associable, combine(event, Flags.USE));
what = "use that";
/* Inventory */