From 6705d2e4b1426cc9b5cbd6a475b77d2991bc2756 Mon Sep 17 00:00:00 2001 From: EpicKnarvik97 Date: Sat, 22 Jan 2022 07:53:05 +0100 Subject: [PATCH] Fixes a bug that protects blocks around permission signs --- .../knarcraft/permissionsigns/listener/BlockListener.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/main/java/net/knarcraft/permissionsigns/listener/BlockListener.java b/src/main/java/net/knarcraft/permissionsigns/listener/BlockListener.java index 0c23a34..8d30e43 100644 --- a/src/main/java/net/knarcraft/permissionsigns/listener/BlockListener.java +++ b/src/main/java/net/knarcraft/permissionsigns/listener/BlockListener.java @@ -100,7 +100,9 @@ public class BlockListener implements Listener { //Protect any permission signs attached to the block for (BlockFace blockFace : getRelevantBlockFaces()) { - blocksToCheck.put(block.getRelative(blockFace), Tag.WALL_SIGNS); + if (!(Tag.WALL_SIGNS.isTagged(block.getBlockData().getMaterial()))) { + blocksToCheck.put(block.getRelative(blockFace), Tag.WALL_SIGNS); + } } for (Block blockToCheck : blocksToCheck.keySet()) { @@ -161,6 +163,7 @@ public class BlockListener implements Listener { * @return

True if the material is affected by gravity

*/ private boolean isAffectedByGravity(Material material) { + //TODO: Find a better way of deciding which blocks are affected by gravity return Tag.SAND.isTagged(material) || Tag.ANVIL.isTagged(material) || material == Material.POINTED_DRIPSTONE || Tag.SIGNS.isTagged(material) || material == Material.DRAGON_EGG || material == Material.GRAVEL || material == Material.BLACK_CONCRETE_POWDER || material == Material.BLUE_CONCRETE_POWDER ||