Merge branch 'development'
This commit is contained in:
commit
98538649f5
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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>
|
||||||
|
|
|
@ -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(
|
||||||
|
|
|
@ -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();
|
||||||
|
|
|
@ -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();
|
||||||
|
|
|
@ -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);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -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>
|
||||||
|
|
4
pom.xml
4
pom.xml
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue