mirror of
https://github.com/IntellectualSites/PlotSquared.git
synced 2024-11-26 23:26: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
|
@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 {
|
||||||
|
Loading…
Reference in New Issue
Block a user