Fixes a bug that protects blocks around permission signs

This commit is contained in:
Kristian Knarvik 2022-01-22 07:53:05 +01:00
parent 3bb5970a57
commit 6705d2e4b1

View File

@ -100,8 +100,10 @@ public class BlockListener implements Listener {
//Protect any permission signs attached to the block
for (BlockFace blockFace : getRelevantBlockFaces()) {
if (!(Tag.WALL_SIGNS.isTagged(block.getBlockData().getMaterial()))) {
blocksToCheck.put(block.getRelative(blockFace), Tag.WALL_SIGNS);
}
}
for (Block blockToCheck : blocksToCheck.keySet()) {
if (blocksToCheck.get(blockToCheck).isTagged(blockToCheck.getBlockData().getMaterial())) {
@ -161,6 +163,7 @@ public class BlockListener implements Listener {
* @return <p>True if the material is affected by gravity</p>
*/
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 ||