mirror of
https://github.com/proxiodev/RedisBungee.git
synced 2024-11-26 22:18:01 +00:00
Make UUIDResolver properly deal with usernames
This commit is contained in:
parent
d84f42952c
commit
0a2b43e7dc
@ -16,6 +16,7 @@ import net.md_5.bungee.api.ProxyServer;
|
|||||||
import redis.clients.jedis.Jedis;
|
import redis.clients.jedis.Jedis;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
import java.util.logging.Level;
|
import java.util.logging.Level;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
@ -53,14 +54,15 @@ public class UUIDTranslator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// That didn't work. Let's ask Mojang.
|
// That didn't work. Let's ask Mojang.
|
||||||
uuid = UUIDFetcher.getUUIDOf(player);
|
for (Map.Entry<String, UUID> entry : new UUIDFetcher(Collections.singletonList(player)).call().entrySet()) {
|
||||||
|
if (entry.getKey().equalsIgnoreCase(player)) {
|
||||||
if (uuid != null) {
|
uuidMap.put(player, entry.getValue());
|
||||||
uuidMap.put(player, uuid);
|
storeInfo(player, entry.getValue(), jedis);
|
||||||
storeInfo(player, uuid, jedis);
|
return entry.getValue();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return uuid;
|
return null;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
plugin.getLogger().log(Level.SEVERE, "Unable to fetch UUID for " + player, e);
|
plugin.getLogger().log(Level.SEVERE, "Unable to fetch UUID for " + player, e);
|
||||||
return null;
|
return null;
|
||||||
|
Loading…
Reference in New Issue
Block a user