Fixed an NPE

This commit is contained in:
Sauilitired 2014-12-27 13:28:10 +01:00
parent 8a95231587
commit a742dd7192

View File

@ -25,7 +25,12 @@ public class OfflineUUIDWrapper extends UUIDWrapper {
@Override @Override
public OfflinePlayer getOfflinePlayer(final UUID uuid) { public OfflinePlayer getOfflinePlayer(final UUID uuid) {
final BiMap<UUID, StringWrapper> map = UUIDHandler.getUuidMap().inverse(); final BiMap<UUID, StringWrapper> map = UUIDHandler.getUuidMap().inverse();
final String name = map.get(uuid).value; String name;
try {
name = map.get(uuid).value;
} catch (NullPointerException e) {
name = null;
}
if (name != null) { if (name != null) {
return Bukkit.getOfflinePlayer(name); return Bukkit.getOfflinePlayer(name);
} else { } else {