Run isTall after the material check.

This commit is contained in:
Brianna 2020-04-08 10:34:46 -04:00
parent f87669b513
commit ece72cd0e1

View File

@ -140,7 +140,11 @@ public class Block implements Listener {
if (event.isCancelled() || !configLoad.getBoolean("Island.Block.Level.Enable")) return;
if (CompatibleMaterial.getMaterial(block).isTall()) {
CompatibleMaterial material = CompatibleMaterial.getMaterial(block);
if (material == null) return;
if (material.isTall()) {
final org.bukkit.block.Block belowBlock = block.getRelative(BlockFace.DOWN);
@ -150,8 +154,6 @@ public class Block implements Listener {
}
CompatibleMaterial material = CompatibleMaterial.getMaterial(block);
if (block.getType() == CompatibleMaterial.SPAWNER.getBlockMaterial()) {
CompatibleSpawners spawner = CompatibleSpawners.getSpawner(((CreatureSpawner) block.getState()).getSpawnedType());