Merge branch 'master' into punishments

This commit is contained in:
2022-04-05 13:10:08 -05:00
committed by GitHub
7 changed files with 160 additions and 88 deletions

View File

@ -39,15 +39,15 @@ public class UnbanCMD extends PlexCommand
if (args.length == 1)
{
UUID targetUUID = PlexUtils.getFromName(args[0]);
PlexPlayer plexPlayer = getOfflinePlexPlayer(targetUUID);
if (!DataUtils.hasPlayedBefore(targetUUID))
if (targetUUID == null || !DataUtils.hasPlayedBefore(targetUUID))
{
throw new PlayerNotFoundException();
}
plugin.getPunishmentManager().isAsyncBanned(targetUUID).whenComplete((aBoolean, throwable) ->
{
PlexPlayer plexPlayer = getOfflinePlexPlayer(targetUUID);
if (!aBoolean)
{
send(sender, MiniMessage.miniMessage().deserialize(new PlayerNotBannedException().getMessage()));