i think i fixed the issue when u haven't joined the server yet
This commit is contained in:
parent
fc1d9d7639
commit
ce2c7df7dc
3 changed files with 5 additions and 9 deletions
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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()));
|
||||
|
|
|
@ -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<UUID, Integer> deaths = new HashMap<>();
|
||||
private final HashMap<UUID, Integer> deaths = new HashMap<>();
|
||||
@SuppressWarnings("deprecation")
|
||||
public void setSideBar(Player player) {
|
||||
Scoreboard board = player.getScoreboard();
|
||||
|
|
Loading…
Reference in a new issue