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> <parent>
<artifactId>EpicBosses</artifactId> <artifactId>EpicBosses</artifactId>
<groupId>com.songoda.epicbosses</groupId> <groupId>com.songoda.epicbosses</groupId>
<version>1.2.7</version> <version>1.2.8</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.7</version> <version>1.2.8</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.7</version> <version>1.2.8</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.7</version> <version>1.2.8</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.7</version> <version>1.2.8</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>

View File

@ -90,7 +90,10 @@ public class BossDeathListener implements Listener {
if (commands != null) { if (commands != null) {
if (activeBossHolder.getSpawningPlayerName() != null) if (activeBossHolder.getSpawningPlayerName() != null)
commands.replaceAll(s -> s.replace("{spawner}", activeBossHolder.getSpawningPlayerName())); 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); commands.forEach(serverUtils::sendConsoleCommand);
} }

View File

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