diff --git a/src/main/java/me/night/nullvalkyrie/ui/player/BelowNameManager.java b/src/main/java/me/night/nullvalkyrie/ui/player/BelowNameManager.java index f2b127d..61bfc95 100644 --- a/src/main/java/me/night/nullvalkyrie/ui/player/BelowNameManager.java +++ b/src/main/java/me/night/nullvalkyrie/ui/player/BelowNameManager.java @@ -7,7 +7,7 @@ import org.bukkit.scoreboard.*; public class BelowNameManager { public void setBelowName(Player player) { Scoreboard board = player.getScoreboard(); - Objective obj = board.registerNewObjective("HealthBar", Criteria.create("CustomHealth"), ChatColor.RED.toString() + player.getHealth() + "❤"); + Objective obj = board.registerNewObjective("HealthBar", Criteria.HEALTH, ChatColor.RED + "❤"); obj.setDisplaySlot(DisplaySlot.BELOW_NAME); player.setScoreboard(board); }