mirror of
https://github.com/plexusorg/Plex.git
synced 2025-07-01 15:46:42 +00:00
Actually add IPs to punishment
This commit is contained in:
@ -84,6 +84,10 @@ public class BanCMD extends PlexCommand
|
||||
punishment.setEndDate(date.plusDays(1));
|
||||
punishment.setCustomTime(false);
|
||||
punishment.setActive(!isAdmin(plexPlayer));
|
||||
if (player != null)
|
||||
{
|
||||
punishment.setIp(player.getAddress().getAddress().getHostAddress().trim());
|
||||
}
|
||||
plugin.getPunishmentManager().doPunishment(punishedPlayer, punishment);
|
||||
PlexUtils.broadcast(messageComponent("banningPlayer", sender.getName(), plexPlayer.getName()));
|
||||
if (player != null)
|
||||
|
@ -58,6 +58,7 @@ public class FreezeCMD extends PlexCommand
|
||||
punishment.setEndDate(date.plusMinutes(5));
|
||||
punishment.setType(PunishmentType.FREEZE);
|
||||
punishment.setPunishedUsername(player.getName());
|
||||
punishment.setIp(player.getAddress().getAddress().getHostAddress().trim());
|
||||
punishment.setReason("");
|
||||
|
||||
plugin.getPunishmentManager().doPunishment(punishedPlayer, punishment);
|
||||
|
@ -63,6 +63,7 @@ public class KickCMD extends PlexCommand
|
||||
punishment.setEndDate(LocalDateTime.now());
|
||||
punishment.setCustomTime(false);
|
||||
punishment.setActive(false);
|
||||
punishment.setIp(player.getAddress().getAddress().getHostAddress().trim());
|
||||
plugin.getPunishmentManager().doPunishment(punishedPlayer, punishment);
|
||||
PlexUtils.broadcast(messageComponent("kickedPlayer", sender.getName(), plexPlayer.getName()));
|
||||
player.kick(componentFromString(reason));
|
||||
|
@ -58,6 +58,7 @@ public class MuteCMD extends PlexCommand
|
||||
punishment.setEndDate(date.plusMinutes(5));
|
||||
punishment.setType(PunishmentType.MUTE);
|
||||
punishment.setPunishedUsername(player.getName());
|
||||
punishment.setIp(player.getAddress().getAddress().getHostAddress().trim());
|
||||
punishment.setReason("");
|
||||
|
||||
plugin.getPunishmentManager().doPunishment(punishedPlayer, punishment);
|
||||
|
@ -82,6 +82,10 @@ public class TempbanCMD extends PlexCommand
|
||||
punishment.setEndDate(PlexUtils.parseDateOffset(args[1]));
|
||||
punishment.setCustomTime(false);
|
||||
punishment.setActive(!isAdmin(plexPlayer));
|
||||
if (player != null)
|
||||
{
|
||||
punishment.setIp(player.getAddress().getAddress().getHostAddress().trim());
|
||||
}
|
||||
plugin.getPunishmentManager().doPunishment(punishedPlayer, punishment);
|
||||
PlexUtils.broadcast(messageComponent("banningPlayer", sender.getName(), plexPlayer.getName()));
|
||||
if (player != null)
|
||||
|
Reference in New Issue
Block a user