Removed overloads and changed Player to OfflinePlayer

This commit is contained in:
Zane 2020-01-06 12:06:01 +00:00 committed by Brianna
parent 154aab7ee5
commit 68a1a65149

View File

@ -82,15 +82,7 @@ public class LeaderboardManager {
}
}
public int getPlayerIslandLeaderboardPosition(Player player, Leaderboard.Type type) {
return getPlayerIslandLeaderboardPosition(player.getUniqueId(), type);
}
public int getPlayerIslandLeaderboardPosition(OfflinePlayer offlinePlayer, Leaderboard.Type type) {
return getPlayerIslandLeaderboardPosition(offlinePlayer.getUniqueId(), type);
}
public int getPlayerIslandLeaderboardPosition(UUID uuid, Leaderboard.Type type) {
VisitManager visitManager = skyblock.getVisitManager();
visitManager.loadIslands();
@ -119,7 +111,7 @@ public class LeaderboardManager {
leaderboardPlayers.sort(Comparator.comparingLong(LeaderboardPlayer::getValue).reversed());
for (int i = 0; i < leaderboardPlayers.size(); i++) {
if (leaderboardPlayers.get(i).getUUID().equals(uuid) {
if (leaderboardPlayers.get(i).getUUID().equals(offlinePlayer.getUniqueId()) {
return i + 1;
}
}