damage cause on health and player kill event

This commit is contained in:
unurled 2024-03-14 18:47:37 +01:00
parent 9bedf456db
commit f387c63183
Signed by: unurled
GPG key ID: FDBC9CBE1F82423F
4 changed files with 53 additions and 14 deletions

View file

@ -56,9 +56,9 @@ public class SRPlayerUtils {
}
public static void updateActionBar(@NotNull Player p, @NotNull SRPlayer sr) {
double maxHealth = sr.getAttribute(Attribute.HEALTH);
double health = sr.getHealth();
double mana = sr.getAttribute(Attribute.MANA);
int maxHealth = (int) sr.getAttribute(Attribute.HEALTH);
int health = (int) sr.getHealth();
int mana = (int) sr.getAttribute(Attribute.MANA);
net.kyori.adventure.text.Component text =
comp("<red>❤ " + health + "/" + maxHealth + " <blue>❈ " + mana);