mirror of
https://github.com/songoda/EpicBosses.git
synced 2024-09-27 13:03:01 +02:00
Fixed an issue with spawning bosses in water on 1.8
This commit is contained in:
parent
10b37f8867
commit
2f64dc55af
@ -53,8 +53,6 @@ public class BossSpawnListener implements Listener {
|
|||||||
Action action = event.getAction();
|
Action action = event.getAction();
|
||||||
|
|
||||||
if (!event.hasItem()) return;
|
if (!event.hasItem()) return;
|
||||||
if (action != Action.RIGHT_CLICK_BLOCK) return;
|
|
||||||
if (block.getType() == Material.AIR) return;
|
|
||||||
|
|
||||||
Map<BossEntity, ItemStack> entitiesAndSpawnItems = this.bossEntityManager.getMapOfEntitiesAndSpawnItems();
|
Map<BossEntity, ItemStack> entitiesAndSpawnItems = this.bossEntityManager.getMapOfEntitiesAndSpawnItems();
|
||||||
ItemStack itemStack = player.getItemInHand();
|
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()) {
|
if (bossEntity.isEditing()) {
|
||||||
Message.Boss_Edit_CannotSpawn.msg(player);
|
Message.Boss_Edit_CannotSpawn.msg(player);
|
||||||
|
Loading…
Reference in New Issue
Block a user