Dieser Commit ist enthalten in:
Ursprung
727a27a9fb
Commit
a8270a386c
@ -34,6 +34,8 @@ import java.util.concurrent.ConcurrentHashMap;
|
|||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public class UserElo {
|
public class UserElo {
|
||||||
|
|
||||||
|
private static final int ELO_DEFAULT = 0;
|
||||||
|
|
||||||
private static final Map<String, Map<Integer, Optional<Integer>>> gameModeUserEloCache = new ConcurrentHashMap<>();
|
private static final Map<String, Map<Integer, Optional<Integer>>> gameModeUserEloCache = new ConcurrentHashMap<>();
|
||||||
private static final Map<Integer, String> emblemCache = new ConcurrentHashMap<>();
|
private static final Map<Integer, String> emblemCache = new ConcurrentHashMap<>();
|
||||||
|
|
||||||
@ -59,7 +61,7 @@ public class UserElo {
|
|||||||
private final int elo;
|
private final int elo;
|
||||||
|
|
||||||
public static int getEloOrDefault(int userID, String gameMode) {
|
public static int getEloOrDefault(int userID, String gameMode) {
|
||||||
return getElo(userID, gameMode).orElse(0);
|
return getElo(userID, gameMode).orElse(ELO_DEFAULT);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Optional<Integer> getElo(int userID, String gameMode) {
|
public static Optional<Integer> getElo(int userID, String gameMode) {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren