mirror of
https://github.com/ChestShop-authors/ChestShop-3.git
synced 2025-01-05 22:57:49 +01:00
Add alternative fallbacks
This commit is contained in:
parent
ddf32eda04
commit
f6457e3d47
@ -50,7 +50,10 @@ public class NameManager {
|
||||
}
|
||||
|
||||
if (account == null) {
|
||||
return null;
|
||||
UUID uuid = Bukkit.getOfflinePlayer(username).getUniqueId();
|
||||
usernameToUUID.put(username, uuid);
|
||||
|
||||
return uuid;
|
||||
}
|
||||
|
||||
UUID uuid = account.getUuid();
|
||||
@ -77,6 +80,13 @@ public class NameManager {
|
||||
}
|
||||
|
||||
if (account == null) {
|
||||
String name = Bukkit.getOfflinePlayer(uuid).getName();
|
||||
|
||||
if (name != null) {
|
||||
usernameToUUID.put(name, uuid);
|
||||
return name;
|
||||
}
|
||||
|
||||
return "";
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user