diff --git a/plugin-modules/Core/pom.xml b/plugin-modules/Core/pom.xml index 16671a9..313e6a8 100644 --- a/plugin-modules/Core/pom.xml +++ b/plugin-modules/Core/pom.xml @@ -82,24 +82,24 @@ - - - - - - - - - - - - - - - - - - + + org.apache.maven.plugins + maven-antrun-plugin + 1.8 + + + install + + + + + + + run + + + + \ No newline at end of file diff --git a/plugin-modules/Core/src/com/songoda/epicbosses/mechanics/boss/EntityTypeMechanic.java b/plugin-modules/Core/src/com/songoda/epicbosses/mechanics/boss/EntityTypeMechanic.java index d47a47e..daa0106 100644 --- a/plugin-modules/Core/src/com/songoda/epicbosses/mechanics/boss/EntityTypeMechanic.java +++ b/plugin-modules/Core/src/com/songoda/epicbosses/mechanics/boss/EntityTypeMechanic.java @@ -30,6 +30,8 @@ public class EntityTypeMechanic implements IBossMechanic { if(position == null) position = 1; if(entityFinder == null) return false; + System.out.println("SPAWNING BOSS #" + position); + LivingEntity livingEntity = entityFinder.spawnNewLivingEntity(bossEntityType, activeBossHolder.getLocation()); if(livingEntity == null) return false; diff --git a/plugin-modules/Core/src/com/songoda/epicbosses/panel/bosses/equipment/BootsEditorPanel.java b/plugin-modules/Core/src/com/songoda/epicbosses/panel/bosses/equipment/BootsEditorPanel.java index f7eb8fc..b022ed2 100644 --- a/plugin-modules/Core/src/com/songoda/epicbosses/panel/bosses/equipment/BootsEditorPanel.java +++ b/plugin-modules/Core/src/com/songoda/epicbosses/panel/bosses/equipment/BootsEditorPanel.java @@ -80,7 +80,7 @@ public class BootsEditorPanel extends SubVariablePanelHandler panel.setOnClick(slot, event -> this.bossPanelManager.getAddItemsMenu().openFor(player))); panelBuilderCounter.getSlotsWith("Remove").forEach(slot -> panel.setOnClick(slot, event -> { - entityStatsElement.getEquipment().setHelmet(""); + entityStatsElement.getEquipment().setBoots(""); this.bossesFileManager.save(); openFor((Player) event.getWhoClicked(), bossEntity, entityStatsElement); @@ -101,7 +101,7 @@ public class BootsEditorPanel extends SubVariablePanelHandler itemStackHolderMap, List entryList, BossEntity bossEntity, EntityStatsElement entityStatsElement) { - String helmet = entityStatsElement.getEquipment().getHelmet(); + String boots = entityStatsElement.getEquipment().getBoots(); panel.loadPage(requestedPage, (slot, realisticSlot) -> { if(slot >= itemStackHolderMap.size()) { @@ -115,7 +115,7 @@ public class BootsEditorPanel extends SubVariablePanelHandler replaceMap = new HashMap<>(); replaceMap.put("{name}", ItemStackUtils.getName(itemStack)); @@ -124,7 +124,7 @@ public class BootsEditorPanel extends SubVariablePanelHandler { - entityStatsElement.getEquipment().setHelmet(name); + entityStatsElement.getEquipment().setBoots(name); this.bossesFileManager.save(); openFor((Player) e.getWhoClicked(), bossEntity, entityStatsElement); diff --git a/plugin-modules/Core/src/com/songoda/epicbosses/panel/bosses/equipment/ChestplateEditorPanel.java b/plugin-modules/Core/src/com/songoda/epicbosses/panel/bosses/equipment/ChestplateEditorPanel.java index ab71a58..4c5f297 100644 --- a/plugin-modules/Core/src/com/songoda/epicbosses/panel/bosses/equipment/ChestplateEditorPanel.java +++ b/plugin-modules/Core/src/com/songoda/epicbosses/panel/bosses/equipment/ChestplateEditorPanel.java @@ -80,7 +80,7 @@ public class ChestplateEditorPanel extends SubVariablePanelHandler panel.setOnClick(slot, event -> this.bossPanelManager.getAddItemsMenu().openFor(player))); panelBuilderCounter.getSlotsWith("Remove").forEach(slot -> panel.setOnClick(slot, event -> { - entityStatsElement.getEquipment().setHelmet(""); + entityStatsElement.getEquipment().setChestplate(""); this.bossesFileManager.save(); openFor((Player) event.getWhoClicked(), bossEntity, entityStatsElement); @@ -101,7 +101,7 @@ public class ChestplateEditorPanel extends SubVariablePanelHandler itemStackHolderMap, List entryList, BossEntity bossEntity, EntityStatsElement entityStatsElement) { - String helmet = entityStatsElement.getEquipment().getHelmet(); + String chestplate = entityStatsElement.getEquipment().getChestplate(); panel.loadPage(requestedPage, (slot, realisticSlot) -> { if(slot >= itemStackHolderMap.size()) { @@ -115,7 +115,7 @@ public class ChestplateEditorPanel extends SubVariablePanelHandler replaceMap = new HashMap<>(); replaceMap.put("{name}", ItemStackUtils.getName(itemStack)); @@ -124,7 +124,7 @@ public class ChestplateEditorPanel extends SubVariablePanelHandler { - entityStatsElement.getEquipment().setHelmet(name); + entityStatsElement.getEquipment().setChestplate(name); this.bossesFileManager.save(); openFor((Player) e.getWhoClicked(), bossEntity, entityStatsElement); diff --git a/plugin-modules/Core/src/com/songoda/epicbosses/panel/bosses/equipment/LeggingsEditorPanel.java b/plugin-modules/Core/src/com/songoda/epicbosses/panel/bosses/equipment/LeggingsEditorPanel.java index 3e63ab8..711ee12 100644 --- a/plugin-modules/Core/src/com/songoda/epicbosses/panel/bosses/equipment/LeggingsEditorPanel.java +++ b/plugin-modules/Core/src/com/songoda/epicbosses/panel/bosses/equipment/LeggingsEditorPanel.java @@ -80,7 +80,7 @@ public class LeggingsEditorPanel extends SubVariablePanelHandler panel.setOnClick(slot, event -> this.bossPanelManager.getAddItemsMenu().openFor(player))); panelBuilderCounter.getSlotsWith("Remove").forEach(slot -> panel.setOnClick(slot, event -> { - entityStatsElement.getEquipment().setHelmet(""); + entityStatsElement.getEquipment().setLeggings(""); this.bossesFileManager.save(); openFor((Player) event.getWhoClicked(), bossEntity, entityStatsElement); @@ -101,7 +101,7 @@ public class LeggingsEditorPanel extends SubVariablePanelHandler itemStackHolderMap, List entryList, BossEntity bossEntity, EntityStatsElement entityStatsElement) { - String helmet = entityStatsElement.getEquipment().getHelmet(); + String leggings = entityStatsElement.getEquipment().getLeggings(); panel.loadPage(requestedPage, (slot, realisticSlot) -> { if(slot >= itemStackHolderMap.size()) { @@ -115,7 +115,7 @@ public class LeggingsEditorPanel extends SubVariablePanelHandler replaceMap = new HashMap<>(); replaceMap.put("{name}", ItemStackUtils.getName(itemStack)); @@ -124,7 +124,7 @@ public class LeggingsEditorPanel extends SubVariablePanelHandler { - entityStatsElement.getEquipment().setHelmet(name); + entityStatsElement.getEquipment().setLeggings(name); this.bossesFileManager.save(); openFor((Player) e.getWhoClicked(), bossEntity, entityStatsElement); diff --git a/plugin-modules/Core/src/com/songoda/epicbosses/targeting/TargetHandler.java b/plugin-modules/Core/src/com/songoda/epicbosses/targeting/TargetHandler.java index b88b004..a117c9f 100644 --- a/plugin-modules/Core/src/com/songoda/epicbosses/targeting/TargetHandler.java +++ b/plugin-modules/Core/src/com/songoda/epicbosses/targeting/TargetHandler.java @@ -51,8 +51,11 @@ public abstract class TargetHandler implements ITa if(boss == null) return; List nearbyEntities = new ArrayList<>(); + List nearbyBossEntities = boss.getNearbyEntities(radius, radius, radius); - for(Entity entity : boss.getNearbyEntities(radius, radius, radius)) { + if(nearbyBossEntities == null) return; + + for(Entity entity : nearbyBossEntities) { if(!(entity instanceof Player)) continue; LivingEntity livingEntity = (LivingEntity) entity; diff --git a/pom.xml b/pom.xml index 20cccb2..cc1829f 100644 --- a/pom.xml +++ b/pom.xml @@ -19,7 +19,7 @@ - maven-version-number-SNAPSHOT-U75 + maven-version-number-SNAPSHOT-U76 EpicBosses com.songoda.epicbosses.CustomBosses AMinecraftDev