aboutsummaryrefslogtreecommitdiff
path: root/build/hypixelCached.js
diff options
context:
space:
mode:
Diffstat (limited to 'build/hypixelCached.js')
-rw-r--r--build/hypixelCached.js3
1 files changed, 3 insertions, 0 deletions
diff --git a/build/hypixelCached.js b/build/hypixelCached.js
index 660bab4..15a1cec 100644
--- a/build/hypixelCached.js
+++ b/build/hypixelCached.js
@@ -77,6 +77,8 @@ async function uuidFromUser(user) {
}
// not cached, actually fetch mojang api now
let { uuid, username } = await mojang.mojangDataFromUser(user);
+ if (!uuid)
+ return;
// remove dashes from the uuid so its more normal
uuid = util_1.undashUuid(uuid);
usernameCache.set(uuid, username);
@@ -109,6 +111,7 @@ async function fetchPlayer(user) {
// clone in case it gets modified somehow later
const cleanPlayerClone = Object.assign({}, cleanPlayer);
playerCache.set(playerUuid, cleanPlayerClone);
+ usernameCache.set(playerUuid, cleanPlayerClone.username);
return cleanPlayer;
}
exports.fetchPlayer = fetchPlayer;