so far it is working but the only thing preventing me from going to fully asynchronous calls for punishments is httpd...

This commit is contained in:
Taah
2022-04-04 01:36:50 -07:00
parent 35d436bb61
commit 6f4bc5aec1
38 changed files with 483 additions and 528 deletions

View File

@ -1,12 +1,11 @@
package dev.plex.command.impl;
import com.google.common.collect.ImmutableList;
import dev.plex.cache.PlayerCache;
import dev.plex.cache.player.PlayerCache;
import dev.plex.command.PlexCommand;
import dev.plex.command.annotation.CommandParameters;
import dev.plex.command.annotation.CommandPermissions;
import dev.plex.player.PlexPlayer;
import dev.plex.player.PunishedPlayer;
import dev.plex.punishment.Punishment;
import dev.plex.punishment.PunishmentType;
import dev.plex.rank.enums.Rank;
@ -32,7 +31,7 @@ public class FreezeCMD extends PlexCommand
return usage();
}
Player player = getNonNullPlayer(args[0]);
PunishedPlayer punishedPlayer = PlayerCache.getPunishedPlayer(player.getUniqueId());
PlexPlayer punishedPlayer = getPlexPlayer(player);
if (punishedPlayer.isFrozen())
{
@ -61,7 +60,7 @@ public class FreezeCMD extends PlexCommand
punishment.setIp(player.getAddress().getAddress().getHostAddress().trim());
punishment.setReason("");
plugin.getPunishmentManager().doPunishment(punishedPlayer, punishment);
plugin.getPunishmentManager().punish(punishedPlayer, punishment);
PlexUtils.broadcast(messageComponent("frozePlayer", sender.getName(), player.getName()));
return null;
}