Fix NPE in getOrLoadClient
This commit is contained in:
parent
8f72f9d087
commit
f23f04fdb1
@ -45,7 +45,6 @@ import mineplex.core.common.util.Callback;
|
|||||||
import mineplex.core.common.util.UUIDFetcher;
|
import mineplex.core.common.util.UUIDFetcher;
|
||||||
import mineplex.core.common.util.UtilPlayer;
|
import mineplex.core.common.util.UtilPlayer;
|
||||||
import mineplex.core.common.util.UtilTasks;
|
import mineplex.core.common.util.UtilTasks;
|
||||||
import mineplex.core.portal.Portal;
|
|
||||||
import mineplex.core.updater.UpdateType;
|
import mineplex.core.updater.UpdateType;
|
||||||
import mineplex.core.updater.event.UpdateEvent;
|
import mineplex.core.updater.event.UpdateEvent;
|
||||||
import mineplex.core.utils.UtilGameProfile;
|
import mineplex.core.utils.UtilGameProfile;
|
||||||
@ -138,7 +137,7 @@ public class CoreClientManager extends MiniPlugin
|
|||||||
public CoreClient Get(String name)
|
public CoreClient Get(String name)
|
||||||
{
|
{
|
||||||
Player p = Bukkit.getPlayerExact(name);
|
Player p = Bukkit.getPlayerExact(name);
|
||||||
return Get(p.getUniqueId());
|
return p != null ? Get(p.getUniqueId()) : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public CoreClient Get(UUID uuid)
|
public CoreClient Get(UUID uuid)
|
||||||
|
Loading…
Reference in New Issue
Block a user