Add alternative fallbacks

This commit is contained in:
Andrzej Pomirski 2014-06-22 14:32:50 +02:00
parent ddf32eda04
commit f6457e3d47

View File

@ -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 "";
}