From 2f64dc55af862c1ddd705c977258e3e0fca44cbd Mon Sep 17 00:00:00 2001 From: Brianna Date: Tue, 22 Oct 2019 11:51:01 -0400 Subject: [PATCH] Fixed an issue with spawning bosses in water on 1.8 --- .../epicbosses/listeners/pre/BossSpawnListener.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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);