+ Fixed issue with removing Items from the EpicBosses Item Database
This commit is contained in:
Charles 2019-01-24 01:43:40 +08:00
parent 3198dafd4b
commit 713f79552c
2 changed files with 18 additions and 12 deletions

View File

@ -202,20 +202,26 @@ public class BossPanelManager implements ILoadable, IReloadable {
int timesUsed = 0;
for(BossEntity bossEntity : values) {
if(bossEntity.getSpawnItem().equalsIgnoreCase(name)) timesUsed += 1;
if(bossEntity != null) {
if (bossEntity.getSpawnItem() != null) {
if (bossEntity.getSpawnItem().equalsIgnoreCase(name)) timesUsed += 1;
}
List<EntityStatsElement> entityStatsElements = bossEntity.getEntityStats();
if (bossEntity.getEntityStats() != null) {
List<EntityStatsElement> entityStatsElements = bossEntity.getEntityStats();
for(EntityStatsElement entityStatsElement : entityStatsElements) {
EquipmentElement equipmentElement = entityStatsElement.getEquipment();
HandsElement handsElement = entityStatsElement.getHands();
for (EntityStatsElement entityStatsElement : entityStatsElements) {
EquipmentElement equipmentElement = entityStatsElement.getEquipment();
HandsElement handsElement = entityStatsElement.getHands();
if(handsElement.getMainHand().equalsIgnoreCase(name)) timesUsed += 1;
if(handsElement.getOffHand().equalsIgnoreCase(name)) timesUsed += 1;
if(equipmentElement.getHelmet().equalsIgnoreCase(name)) timesUsed += 1;
if(equipmentElement.getChestplate().equalsIgnoreCase(name)) timesUsed += 1;
if(equipmentElement.getLeggings().equalsIgnoreCase(name)) timesUsed += 1;
if(equipmentElement.getBoots().equalsIgnoreCase(name)) timesUsed += 1;
if (handsElement.getMainHand().equalsIgnoreCase(name)) timesUsed += 1;
if (handsElement.getOffHand().equalsIgnoreCase(name)) timesUsed += 1;
if (equipmentElement.getHelmet().equalsIgnoreCase(name)) timesUsed += 1;
if (equipmentElement.getChestplate().equalsIgnoreCase(name)) timesUsed += 1;
if (equipmentElement.getLeggings().equalsIgnoreCase(name)) timesUsed += 1;
if (equipmentElement.getBoots().equalsIgnoreCase(name)) timesUsed += 1;
}
}
}
}

View File

@ -19,7 +19,7 @@
</modules>
<properties>
<plugin.version>1.0.2-U2</plugin.version>
<plugin.version>1.0.3-U1</plugin.version>
<plugin.name>EpicBosses</plugin.name>
<plugin.main>com.songoda.epicbosses.CustomBosses</plugin.main>
<plugin.author>AMinecraftDev</plugin.author>