Merge branch 'development'
This commit is contained in:
commit
98538649f5
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>EpicBosses</artifactId>
|
||||
<groupId>com.songoda.epicbosses</groupId>
|
||||
<version>1.2.6</version>
|
||||
<version>1.2.7</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>EpicBosses</artifactId>
|
||||
<groupId>com.songoda.epicbosses</groupId>
|
||||
<version>1.2.6</version>
|
||||
<version>1.2.7</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>EpicBosses</artifactId>
|
||||
<groupId>com.songoda.epicbosses</groupId>
|
||||
<version>1.2.6</version>
|
||||
<version>1.2.7</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>EpicBosses</artifactId>
|
||||
<groupId>com.songoda.epicbosses</groupId>
|
||||
<version>1.2.6</version>
|
||||
<version>1.2.7</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>EpicBosses</artifactId>
|
||||
<groupId>com.songoda.epicbosses</groupId>
|
||||
<version>1.2.6</version>
|
||||
<version>1.2.7</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
|
@ -105,6 +105,7 @@ public class ActiveBossHolder implements IActiveHolder {
|
|||
|
||||
// grab list of all valid entities by UUID that can be removed
|
||||
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())))
|
||||
.entrySet().stream()
|
||||
.filter(e -> e.getValue() != null && e.getValue().getWorld().isChunkLoaded(
|
||||
|
|
|
@ -45,7 +45,7 @@ public class BossDeathListener implements Listener {
|
|||
ActiveBossHolder activeBossHolder = this.bossEntityManager.getActiveBossHolder(livingEntity);
|
||||
Location location = livingEntity.getLocation();
|
||||
|
||||
if (activeBossHolder == null) return;
|
||||
if (activeBossHolder == null || entityDamageEvent == null) return;
|
||||
|
||||
EntityDamageEvent.DamageCause damageCause = entityDamageEvent.getCause();
|
||||
Boolean naturalDrops = activeBossHolder.getBossEntity().getDrops().getNaturalDrops();
|
||||
|
|
|
@ -21,7 +21,8 @@ public class HealthMechanic implements IMinionMechanic {
|
|||
if (activeMinionHolder.getLivingEntityMap() == null || activeMinionHolder.getLivingEntityMap().isEmpty())
|
||||
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()) {
|
||||
MainStatsElement mainStatsElement = entityStatsElement.getMainStats();
|
||||
|
|
|
@ -6,10 +6,7 @@ import com.songoda.epicbosses.managers.BossTargetManager;
|
|||
import com.songoda.epicbosses.utils.ServerUtils;
|
||||
import org.bukkit.Bukkit;
|
||||
import org.bukkit.GameMode;
|
||||
import org.bukkit.entity.Creature;
|
||||
import org.bukkit.entity.Entity;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
import org.bukkit.entity.Player;
|
||||
import org.bukkit.entity.*;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
@ -78,7 +75,10 @@ public abstract class TargetHandler<Holder extends IActiveHolder> implements ITa
|
|||
getHolder().getLivingEntityMap().values().forEach(uuid -> {
|
||||
LivingEntity livingEntity = (LivingEntity) ServerUtils.get().getEntity(uuid);
|
||||
if (livingEntity != null && !livingEntity.isDead()) {
|
||||
((Creature) livingEntity).setTarget(newTarget);
|
||||
if (livingEntity instanceof Mob)
|
||||
((Mob) livingEntity).setTarget(newTarget);
|
||||
else
|
||||
((Creature) livingEntity).setTarget(newTarget);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<parent>
|
||||
<artifactId>EpicBosses</artifactId>
|
||||
<groupId>com.songoda.epicbosses</groupId>
|
||||
<version>1.2.6</version>
|
||||
<version>1.2.7</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
|
4
pom.xml
4
pom.xml
|
@ -4,7 +4,7 @@
|
|||
<groupId>com.songoda.epicbosses</groupId>
|
||||
<artifactId>EpicBosses</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>1.2.6</version>
|
||||
<version>1.2.7</version>
|
||||
|
||||
<modules>
|
||||
<module>api-modules/FactionsM</module>
|
||||
|
@ -16,7 +16,7 @@
|
|||
</modules>
|
||||
|
||||
<properties>
|
||||
<plugin.version>1.2.6</plugin.version>
|
||||
<plugin.version>1.2.7</plugin.version>
|
||||
<plugin.name>EpicBosses</plugin.name>
|
||||
<plugin.main>com.songoda.epicbosses.EpicBosses</plugin.main>
|
||||
<plugin.author>Songoda</plugin.author>
|
||||
|
|
Loading…
Reference in New Issue