From f0f5c87e3a8cae53e7a4bb5ce3eca8bd0da095ed Mon Sep 17 00:00:00 2001 From: Seb Date: Thu, 21 Apr 2022 11:45:50 +0100 Subject: [PATCH] test: Removed user rank search algorithm to determine XP issue (#87) --- .../de/voidtech/gerald/service/ExperienceService.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/java/de/voidtech/gerald/service/ExperienceService.java b/src/main/java/de/voidtech/gerald/service/ExperienceService.java index dbd6dc1a..82e4f984 100644 --- a/src/main/java/de/voidtech/gerald/service/ExperienceService.java +++ b/src/main/java/de/voidtech/gerald/service/ExperienceService.java @@ -120,12 +120,12 @@ public List getServerLeaderboardChunk(long serverID, int limit, int public int getUserLeaderboardPosition(long serverID, String userID) { List leaderboard = getServerLeaderboard(serverID); int position = 0; - boolean found = false; + //boolean found = false; - while (!found & leaderboard.iterator().hasNext()) { - position++; - if (leaderboard.iterator().next().getUserID().equals(userID)) found = true; - } + //while (!found & leaderboard.iterator().hasNext()) { + //position++; + //if (leaderboard.iterator().next().getUserID().equals(userID)) found = true; + //} return position; }