mirror of
https://github.com/plexusorg/Plex.git
synced 2025-07-05 00:56:42 +00:00
Reduce code duplication
This commit is contained in:
@ -67,13 +67,7 @@ public class KickCMD extends PlexCommand
|
||||
punishment.setIp(player.getAddress().getAddress().getHostAddress().trim());
|
||||
plugin.getPunishmentManager().punish(plexPlayer, punishment);
|
||||
PlexUtils.broadcast(messageComponent("kickedPlayer", sender.getName(), plexPlayer.getName()));
|
||||
if (BungeeUtil.isBungeeCord() || BungeeUtil.isVelocity())
|
||||
{
|
||||
BungeeUtil.kickPlayer(player, Punishment.generateBanMessage(punishment));
|
||||
} else
|
||||
{
|
||||
player.kick(Punishment.generateBanMessage(punishment));
|
||||
}
|
||||
BungeeUtil.kickPlayer(player, Punishment.generateBanMessage(punishment));
|
||||
return null;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user