mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-22 13:16:45 +01:00
Fixed an NPE
This commit is contained in:
parent
8a95231587
commit
a742dd7192
@ -25,7 +25,12 @@ public class OfflineUUIDWrapper extends UUIDWrapper {
|
||||
@Override
|
||||
public OfflinePlayer getOfflinePlayer(final UUID uuid) {
|
||||
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) {
|
||||
return Bukkit.getOfflinePlayer(name);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user