Merge branch 'development'

This commit is contained in:
Brianna 2020-02-11 16:09:39 -05:00
commit b09aecd351
9 changed files with 15 additions and 11 deletions

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -90,7 +90,10 @@ public class BossDeathListener implements Listener {
if (commands != null) {
if (activeBossHolder.getSpawningPlayerName() != null)
commands.replaceAll(s -> s.replace("{spawner}", activeBossHolder.getSpawningPlayerName()));
if (event.getKiller() != null) commands.replaceAll(s -> s.replace("{killer}", event.getKiller().getName()));
if (event.getKiller() != null) {
commands.replaceAll(s -> s.replace("{killer}", event.getKiller().getName()));
commands.replaceAll(s -> s.replace("%player%", event.getKiller().getName()));
}
commands.forEach(serverUtils::sendConsoleCommand);
}

View File

@ -1,5 +1,6 @@
package com.songoda.epicbosses.targeting;
import com.songoda.core.compatibility.ServerVersion;
import com.songoda.epicbosses.EpicBosses;
import com.songoda.epicbosses.holder.IActiveHolder;
import com.songoda.epicbosses.managers.BossTargetManager;
@ -75,9 +76,9 @@ 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()) {
if (livingEntity instanceof Mob)
if (ServerVersion.isServerVersionAtLeast(ServerVersion.V1_12) && livingEntity instanceof Mob)
((Mob) livingEntity).setTarget(newTarget);
else
else if (livingEntity instanceof Creature)
((Creature) livingEntity).setTarget(newTarget);
}
});

View File

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

View File

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