Merge branch 'development'

This commit is contained in:
Brianna 2020-02-01 07:24:36 -05:00
commit 98538649f5
11 changed files with 17 additions and 15 deletions

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>EpicBosses</artifactId> <artifactId>EpicBosses</artifactId>
<groupId>com.songoda.epicbosses</groupId> <groupId>com.songoda.epicbosses</groupId>
<version>1.2.6</version> <version>1.2.7</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>EpicBosses</artifactId> <artifactId>EpicBosses</artifactId>
<groupId>com.songoda.epicbosses</groupId> <groupId>com.songoda.epicbosses</groupId>
<version>1.2.6</version> <version>1.2.7</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>EpicBosses</artifactId> <artifactId>EpicBosses</artifactId>
<groupId>com.songoda.epicbosses</groupId> <groupId>com.songoda.epicbosses</groupId>
<version>1.2.6</version> <version>1.2.7</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>EpicBosses</artifactId> <artifactId>EpicBosses</artifactId>
<groupId>com.songoda.epicbosses</groupId> <groupId>com.songoda.epicbosses</groupId>
<version>1.2.6</version> <version>1.2.7</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>EpicBosses</artifactId> <artifactId>EpicBosses</artifactId>
<groupId>com.songoda.epicbosses</groupId> <groupId>com.songoda.epicbosses</groupId>
<version>1.2.6</version> <version>1.2.7</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -105,6 +105,7 @@ public class ActiveBossHolder implements IActiveHolder {
// grab list of all valid entities by UUID that can be removed // grab list of all valid entities by UUID that can be removed
Map<Integer, Entity> toRemove = this.livingEntityMap.entrySet().stream() Map<Integer, Entity> toRemove = this.livingEntityMap.entrySet().stream()
.filter(Objects::nonNull) // This may fix ticket #4522
.collect(Collectors.toMap(Map.Entry::getKey, e -> ServerUtils.get().getEntity(e.getValue()))) .collect(Collectors.toMap(Map.Entry::getKey, e -> ServerUtils.get().getEntity(e.getValue())))
.entrySet().stream() .entrySet().stream()
.filter(e -> e.getValue() != null && e.getValue().getWorld().isChunkLoaded( .filter(e -> e.getValue() != null && e.getValue().getWorld().isChunkLoaded(

View File

@ -45,7 +45,7 @@ public class BossDeathListener implements Listener {
ActiveBossHolder activeBossHolder = this.bossEntityManager.getActiveBossHolder(livingEntity); ActiveBossHolder activeBossHolder = this.bossEntityManager.getActiveBossHolder(livingEntity);
Location location = livingEntity.getLocation(); Location location = livingEntity.getLocation();
if (activeBossHolder == null) return; if (activeBossHolder == null || entityDamageEvent == null) return;
EntityDamageEvent.DamageCause damageCause = entityDamageEvent.getCause(); EntityDamageEvent.DamageCause damageCause = entityDamageEvent.getCause();
Boolean naturalDrops = activeBossHolder.getBossEntity().getDrops().getNaturalDrops(); Boolean naturalDrops = activeBossHolder.getBossEntity().getDrops().getNaturalDrops();

View File

@ -21,7 +21,8 @@ public class HealthMechanic implements IMinionMechanic {
if (activeMinionHolder.getLivingEntityMap() == null || activeMinionHolder.getLivingEntityMap().isEmpty()) if (activeMinionHolder.getLivingEntityMap() == null || activeMinionHolder.getLivingEntityMap().isEmpty())
return false; return false;
double maxHealthSetting = (double) SpigotYmlReader.get().getObject("settings.attribute.maxHealth.max"); double maxHealthSetting = Double.valueOf( SpigotYmlReader
.get().getObject("settings.attribute.maxHealth.max").toString());
for (EntityStatsElement entityStatsElement : minionEntity.getEntityStats()) { for (EntityStatsElement entityStatsElement : minionEntity.getEntityStats()) {
MainStatsElement mainStatsElement = entityStatsElement.getMainStats(); MainStatsElement mainStatsElement = entityStatsElement.getMainStats();

View File

@ -6,10 +6,7 @@ import com.songoda.epicbosses.managers.BossTargetManager;
import com.songoda.epicbosses.utils.ServerUtils; import com.songoda.epicbosses.utils.ServerUtils;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.GameMode; import org.bukkit.GameMode;
import org.bukkit.entity.Creature; import org.bukkit.entity.*;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
@ -78,7 +75,10 @@ public abstract class TargetHandler<Holder extends IActiveHolder> implements ITa
getHolder().getLivingEntityMap().values().forEach(uuid -> { getHolder().getLivingEntityMap().values().forEach(uuid -> {
LivingEntity livingEntity = (LivingEntity) ServerUtils.get().getEntity(uuid); LivingEntity livingEntity = (LivingEntity) ServerUtils.get().getEntity(uuid);
if (livingEntity != null && !livingEntity.isDead()) { if (livingEntity != null && !livingEntity.isDead()) {
((Creature) livingEntity).setTarget(newTarget); if (livingEntity instanceof Mob)
((Mob) livingEntity).setTarget(newTarget);
else
((Creature) livingEntity).setTarget(newTarget);
} }
}); });
} }

View File

@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>EpicBosses</artifactId> <artifactId>EpicBosses</artifactId>
<groupId>com.songoda.epicbosses</groupId> <groupId>com.songoda.epicbosses</groupId>
<version>1.2.6</version> <version>1.2.7</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -4,7 +4,7 @@
<groupId>com.songoda.epicbosses</groupId> <groupId>com.songoda.epicbosses</groupId>
<artifactId>EpicBosses</artifactId> <artifactId>EpicBosses</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<version>1.2.6</version> <version>1.2.7</version>
<modules> <modules>
<module>api-modules/FactionsM</module> <module>api-modules/FactionsM</module>
@ -16,7 +16,7 @@
</modules> </modules>
<properties> <properties>
<plugin.version>1.2.6</plugin.version> <plugin.version>1.2.7</plugin.version>
<plugin.name>EpicBosses</plugin.name> <plugin.name>EpicBosses</plugin.name>
<plugin.main>com.songoda.epicbosses.EpicBosses</plugin.main> <plugin.main>com.songoda.epicbosses.EpicBosses</plugin.main>
<plugin.author>Songoda</plugin.author> <plugin.author>Songoda</plugin.author>