Fix NPE in unban command

This commit is contained in:
2022-04-04 15:18:20 -05:00
parent 35d436bb61
commit c8a64cc9cb
8 changed files with 159 additions and 88 deletions

View File

@ -37,7 +37,7 @@ public class UnbanCMD extends PlexCommand
UUID targetUUID = PlexUtils.getFromName(args[0]);
PlexPlayer plexPlayer = getOfflinePlexPlayer(targetUUID);
if (!DataUtils.hasPlayedBefore(targetUUID))
if (targetUUID == null || !DataUtils.hasPlayedBefore(targetUUID))
{
throw new PlayerNotFoundException();
}