diff --git a/src/main/java/com/night/nullvalkyrie/RankSys/BelowNameManager.java b/src/main/java/com/night/nullvalkyrie/RankSys/BelowNameManager.java index e7b6cae..46fba52 100644 --- a/src/main/java/com/night/nullvalkyrie/RankSys/BelowNameManager.java +++ b/src/main/java/com/night/nullvalkyrie/RankSys/BelowNameManager.java @@ -1,10 +1,9 @@ package com.night.nullvalkyrie.RankSys; -import org.bukkit.Bukkit; +import org.bukkit.ChatColor; import org.bukkit.entity.Player; import org.bukkit.scoreboard.DisplaySlot; import org.bukkit.scoreboard.Objective; -import org.bukkit.scoreboard.Score; import org.bukkit.scoreboard.Scoreboard; public class BelowNameManager { @@ -12,7 +11,7 @@ public class BelowNameManager { Scoreboard board = player.getScoreboard(); Objective obj = board.registerNewObjective("HealthBar", "health"); obj.setDisplaySlot(DisplaySlot.BELOW_NAME); - obj.setDisplayName("/ 20"); + obj.setDisplayName(ChatColor.RED + "❤"); player.setScoreboard(board); player.setHealth(player.getHealth()); diff --git a/src/main/java/com/night/nullvalkyrie/RankSys/RankManager.java b/src/main/java/com/night/nullvalkyrie/RankSys/RankManager.java index fab35d6..4df440d 100644 --- a/src/main/java/com/night/nullvalkyrie/RankSys/RankManager.java +++ b/src/main/java/com/night/nullvalkyrie/RankSys/RankManager.java @@ -38,11 +38,11 @@ public class RankManager { } catch (IOException e) { e.printStackTrace(); } - if(Bukkit.getOfflinePlayer(uuid).isOnline()) { - Player player = Bukkit.getPlayer(uuid); + for(Player player : Bukkit.getOnlinePlayers()) { main.getNameTagManager().removeTag(player); main.getNameTagManager().newTag(player); } + } public Rank getRank(UUID uuid) { return Rank.valueOf(config.getString(uuid.toString()));