mirror of
https://github.com/plexusorg/Plex.git
synced 2025-07-12 10:28:35 +00:00
- Start the indefinite ban system, currently working with manually adding to the configuration.
- /plex reload reloads the indefinite bans - Fixed bug where AdminChat showed up with symbols still and not colorized in adminchat
This commit is contained in:
@ -13,6 +13,27 @@ public class BanListener extends PlexListener
|
||||
@EventHandler
|
||||
public void onPreLogin(AsyncPlayerPreLoginEvent event)
|
||||
{
|
||||
if (plugin.getPunishmentManager().isIndefUUIDBanned(event.getUniqueId()))
|
||||
{
|
||||
event.disallow(AsyncPlayerPreLoginEvent.Result.KICK_BANNED,
|
||||
Punishment.generateIndefBanMessage("UUID"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (plugin.getPunishmentManager().isIndefIPBanned(event.getAddress().getHostAddress()))
|
||||
{
|
||||
event.disallow(AsyncPlayerPreLoginEvent.Result.KICK_BANNED,
|
||||
Punishment.generateIndefBanMessage("IP"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (plugin.getPunishmentManager().isIndefUserBanned(event.getName()))
|
||||
{
|
||||
event.disallow(AsyncPlayerPreLoginEvent.Result.KICK_BANNED,
|
||||
Punishment.generateIndefBanMessage("username"));
|
||||
return;
|
||||
}
|
||||
|
||||
if (plugin.getPunishmentManager().isBanned(event.getUniqueId()))
|
||||
{
|
||||
PunishedPlayer player = PlayerCache.getPunishedPlayer(event.getUniqueId());
|
||||
|
Reference in New Issue
Block a user