mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2024-11-22 13:16:45 +01:00
Move valid check higher up, no need to set additional metadata
This commit is contained in:
parent
8fd1af4cbf
commit
3cbbf1bee0
@ -44,6 +44,11 @@ public final class MobHealthbarUtils {
|
||||
return;
|
||||
}
|
||||
|
||||
// Don't mangle invalid entities, they're not going to be rendered anyways
|
||||
if (!target.isValid()) {
|
||||
return;
|
||||
}
|
||||
|
||||
String originalName = target.getName();
|
||||
String oldName = target.getCustomName();
|
||||
|
||||
@ -60,10 +65,6 @@ public final class MobHealthbarUtils {
|
||||
return;
|
||||
}
|
||||
|
||||
// Don't mangle invalid entities, they're not going to be rendered anyways
|
||||
if (!target.isValid()) {
|
||||
return;
|
||||
}
|
||||
|
||||
boolean oldNameVisible = target.isCustomNameVisible();
|
||||
String newName = createHealthDisplay(Config.getInstance().getMobHealthbarDefault(), target, damage);
|
||||
|
Loading…
Reference in New Issue
Block a user