diff --git a/plugin-modules/Core/src/com/songoda/epicbosses/listeners/pre/BossSpawnListener.java b/plugin-modules/Core/src/com/songoda/epicbosses/listeners/pre/BossSpawnListener.java index 57e7063..3b5c0ea 100644 --- a/plugin-modules/Core/src/com/songoda/epicbosses/listeners/pre/BossSpawnListener.java +++ b/plugin-modules/Core/src/com/songoda/epicbosses/listeners/pre/BossSpawnListener.java @@ -53,8 +53,6 @@ public class BossSpawnListener implements Listener { Action action = event.getAction(); if (!event.hasItem()) return; - if (action != Action.RIGHT_CLICK_BLOCK) return; - if (block.getType() == Material.AIR) return; Map entitiesAndSpawnItems = this.bossEntityManager.getMapOfEntitiesAndSpawnItems(); ItemStack itemStack = player.getItemInHand(); @@ -67,7 +65,15 @@ public class BossSpawnListener implements Listener { } } - if (bossEntity == null) return; + if (bossEntity == null) + return; + else { + if (action != Action.RIGHT_CLICK_BLOCK + || block.getType() == Material.AIR) { + event.setCancelled(true); + return; + } + } if (bossEntity.isEditing()) { Message.Boss_Edit_CannotSpawn.msg(player);