actually fix it this time

This commit is contained in:
Telesphoreo 2022-04-04 15:22:04 -05:00
parent c8a64cc9cb
commit 8a0c354682
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,6 @@ public class UnbanCMD extends PlexCommand
if (args.length == 1)
{
UUID targetUUID = PlexUtils.getFromName(args[0]);
PlexPlayer plexPlayer = getOfflinePlexPlayer(targetUUID);
if (targetUUID == null || !DataUtils.hasPlayedBefore(targetUUID))
{
@ -47,6 +46,7 @@ public class UnbanCMD extends PlexCommand
throw new PlayerNotBannedException();
}
PlexPlayer plexPlayer = getOfflinePlexPlayer(targetUUID);
plugin.getPunishmentManager().unban(targetUUID);
PlexUtils.broadcast(messageComponent("unbanningPlayer", sender.getName(), plexPlayer.getName()));
}