Fix Leaderboard IndexOutOfBoundsException #33
@ -37,6 +37,7 @@ public class Leaderboard {
|
|||||||
entities.forEach(REntity::die);
|
entities.forEach(REntity::die);
|
||||||
entities.clear();
|
entities.clear();
|
||||||
List<LeaderboardEntry> leaderboard = getLeaderboard();
|
List<LeaderboardEntry> leaderboard = getLeaderboard();
|
||||||
|
if (leaderboard.isEmpty()) return;
|
||||||
long bestTime = leaderboard.get(0).time;
|
long bestTime = leaderboard.get(0).time;
|
||||||
for (int i = 0; i <= best; i++) {
|
for (int i = 0; i <= best; i++) {
|
||||||
if (best - i >= leaderboard.size()) continue;
|
if (best - i >= leaderboard.size()) continue;
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren