mirror of
https://github.com/Auxilor/EcoMobs.git
synced 2025-12-22 08:29:20 +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 -> {
|
||||
String name = entity.getCustomName();
|
||||
assert name != null;
|
||||
|
||||
entity.setCustomName(name.replace("%health%", StringUtils.internalToString(entity.getHealth())));
|
||||
entity.setCustomName(this.getDisplayName().replace("%health%", StringUtils.internalToString(entity.getHealth())));
|
||||
if (entity.isDead()) {
|
||||
runnable.cancel();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user