Fix NPE in PlexCommand

This commit is contained in:
Allink 2022-07-24 01:08:54 +01:00 committed by Allink
parent 4a14f94158
commit 5f64e02cae
No known key found for this signature in database
GPG key ID: 6C2F7CE6E0519E14

View file

@ -132,6 +132,11 @@ public abstract class PlexCommand extends Command implements PluginIdentifiableC
{
PlexPlayer plexPlayer = plugin.getPlayerCache().getPlexPlayerMap().get(player.getUniqueId());
if (plexPlayer == null)
{
return false;
}
if (plugin.getSystem().equalsIgnoreCase("ranks"))
{
if (!plexPlayer.getRankFromString().isAtLeast(getLevel()))