diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java b/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java index 3954562825..9f4f67b0bb 100644 --- a/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java +++ b/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java @@ -189,8 +189,8 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard { @Override public ImmutableSet getPlayers() { ImmutableSet.Builder players = ImmutableSet.builder(); - for (Object playerName : board.getTrackedPlayers()) { - players.add(Bukkit.getOfflinePlayer(playerName.toString())); + for (ScoreHolder playerName : board.getTrackedPlayers()) { + players.add(Bukkit.getOfflinePlayer(playerName.getScoreboardName())); } return players.build(); } @@ -198,8 +198,8 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard { @Override public ImmutableSet getEntries() { ImmutableSet.Builder entries = ImmutableSet.builder(); - for (Object entry : board.getTrackedPlayers()) { - entries.add(entry.toString()); + for (ScoreHolder entry : board.getTrackedPlayers()) { + entries.add(entry.getScoreboardName()); } return entries.build(); }