9
0
mirror of https://github.com/Auxilor/EcoMobs.git synced 2025-12-22 16:39:25 +00:00

Fixed health placeholder not updating

This commit is contained in:
Auxilor
2021-03-20 10:28:55 +00:00
parent a89c460d87
commit 47625fa10e

View File

@@ -500,10 +500,7 @@ public class EcoBoss extends PluginDependent {
} }
this.getPlugin().getRunnableFactory().create(runnable -> { this.getPlugin().getRunnableFactory().create(runnable -> {
String name = entity.getCustomName(); entity.setCustomName(this.getDisplayName().replace("%health%", StringUtils.internalToString(entity.getHealth())));
assert name != null;
entity.setCustomName(name.replace("%health%", StringUtils.internalToString(entity.getHealth())));
if (entity.isDead()) { if (entity.isDead()) {
runnable.cancel(); runnable.cancel();
} }