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:
@@ -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();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user