Update Players.java

This commit is contained in:
kirillsaint 2023-12-07 19:38:32 +06:00
parent 554a770a4d
commit 454fd1b2f8

View File

@ -18,6 +18,7 @@ public class Players {
public static boolean isLoading = false; public static boolean isLoading = false;
public static void reload() { public static void reload() {
Client.logger.info("Clearing players cache");
playersCache.clear(); playersCache.clear();
} }
@ -101,7 +102,7 @@ public class Players {
public void run() { public void run() {
PlayerResponse response = getAccount(name.toLowerCase()); PlayerResponse response = getAccount(name.toLowerCase());
if(response != null && response.getAccount() != null) { if(response != null && response.getAccount() != null) {
playersCache.put(response.getAccount().getUsername(), response.getAccount()); playersCache.put(response.getAccount().getUsername().toLowerCase(), response.getAccount());
} }
try { try {
Thread.sleep(1000); Thread.sleep(1000);