fixed small issue
This commit is contained in:
@@ -33,9 +33,15 @@ public class Nametags extends Module {
|
|||||||
if (!healthDisplay.value) return state.customName.getString(); // name only
|
if (!healthDisplay.value) return state.customName.getString(); // name only
|
||||||
if (!(state instanceof HealthRenderState hrs)) return null;
|
if (!(state instanceof HealthRenderState hrs)) return null;
|
||||||
|
|
||||||
|
float health = hrs.saturn$getHealth();
|
||||||
|
float maxHealth = hrs.saturn$getMaxHealth();
|
||||||
|
|
||||||
|
if (health <= 0f || maxHealth <= 0f || health > maxHealth) return null;
|
||||||
|
|
||||||
return state.customName.getString()
|
return state.customName.getString()
|
||||||
+ " §c" + String.format("%.1f", hrs.saturn$getHealth())
|
+ " §c" + String.format("%.1f", hrs.saturn$getHealth())
|
||||||
+ " / " + String.format("%.1f", hrs.saturn$getMaxHealth()) + " ❤";
|
+ " / " + String.format("%.1f", hrs.saturn$getMaxHealth()) + " ❤";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean shouldReplaceName() {
|
public static boolean shouldReplaceName() {
|
||||||
|
|||||||
Reference in New Issue
Block a user