diff --git a/src/main/java/com/night/nullvalkyrie/Rank/NameTagManager.java b/src/main/java/com/night/nullvalkyrie/Rank/NameTagManager.java index 5a1d220..8d93d2d 100644 --- a/src/main/java/com/night/nullvalkyrie/Rank/NameTagManager.java +++ b/src/main/java/com/night/nullvalkyrie/Rank/NameTagManager.java @@ -38,7 +38,6 @@ public class NameTagManager { } } public void removeTag(Player player) { - Rank rank = main.getRankManager().getRank(player.getUniqueId()); for(Player target : Bukkit.getOnlinePlayers()) { target.getScoreboard().getEntryTeam(player.getName()).removeEntry(player.getName()); } diff --git a/src/main/java/com/night/nullvalkyrie/Rank/RankManager.java b/src/main/java/com/night/nullvalkyrie/Rank/RankManager.java index 909ca77..9e9b00b 100644 --- a/src/main/java/com/night/nullvalkyrie/Rank/RankManager.java +++ b/src/main/java/com/night/nullvalkyrie/Rank/RankManager.java @@ -38,10 +38,11 @@ public class RankManager { e.printStackTrace(); } for(Player player : Bukkit.getOnlinePlayers()) { - main.getNameTagManager().removeTag(player); - main.getNameTagManager().newTag(player); + if(player.getUniqueId() != uuid) { + main.getNameTagManager().removeTag(player); + main.getNameTagManager().newTag(player); + } } - } public Rank getRank(UUID uuid) { return Rank.valueOf(config.getString(uuid.toString())); diff --git a/src/main/java/com/night/nullvalkyrie/Rank/SideBarManager.java b/src/main/java/com/night/nullvalkyrie/Rank/SideBarManager.java index 25c070f..54f45eb 100644 --- a/src/main/java/com/night/nullvalkyrie/Rank/SideBarManager.java +++ b/src/main/java/com/night/nullvalkyrie/Rank/SideBarManager.java @@ -11,11 +11,7 @@ import java.util.HashMap; import java.util.UUID; public class SideBarManager { - private Main main; - public SideBarManager(Main main) { - this.main = main; - } - private HashMap deaths = new HashMap<>(); + private final HashMap deaths = new HashMap<>(); @SuppressWarnings("deprecation") public void setSideBar(Player player) { Scoreboard board = player.getScoreboard();