Fixed scoreboard showing vanish players bug

This commit is contained in:
KingCreator11 2022-06-01 16:18:19 -04:00
parent 27854720f0
commit 6944823a8b

View File

@ -20,6 +20,7 @@ import com.gmail.nossr50.util.skills.SkillTools;
import org.apache.commons.lang.Validate; import org.apache.commons.lang.Validate;
import org.bukkit.Bukkit; import org.bukkit.Bukkit;
import org.bukkit.ChatColor; import org.bukkit.ChatColor;
import org.bukkit.OfflinePlayer;
import org.bukkit.entity.Player; import org.bukkit.entity.Player;
import org.bukkit.scheduler.BukkitRunnable; import org.bukkit.scheduler.BukkitRunnable;
import org.bukkit.scheduler.BukkitTask; import org.bukkit.scheduler.BukkitTask;
@ -633,6 +634,9 @@ public class ScoreboardWrapper {
if (name.equals(playerName)) { if (name.equals(playerName)) {
name = ChatColor.GOLD + "--You--"; name = ChatColor.GOLD + "--You--";
} }
else {
name = " " + ChatColor.WHITE + name + " ";
}
sidebarObjective.getScore(name).setScore(stat.statVal); sidebarObjective.getScore(name).setScore(stat.statVal);
} }