- Fixed blacklisting to stop join spam

This commit is contained in:
AlexTheCoder 2016-01-02 14:35:05 -05:00
parent a4853e667c
commit 2b365e4afd

View File

@ -205,7 +205,7 @@ public class GameHostManager implements Listener
}
@EventHandler
public void whitelistJoin(PlayerLoginEvent event)
public void handleLogin(PlayerLoginEvent event)
{
Player p = event.getPlayer();
if (Manager.GetServerConfig().PlayerServerWhitelist){
@ -217,6 +217,8 @@ public class GameHostManager implements Listener
event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, "This MPS is whitelisted.");
}
}
if (_blacklist.contains(p.getName()))
event.disallow(PlayerLoginEvent.Result.KICK_BANNED, "You were removed from this Mineplex Private Server.");
}
@EventHandler
@ -786,12 +788,6 @@ public class GameHostManager implements Listener
{
if (!isPrivateServer())
return;
if (_blacklist.contains(event.getPlayer().getName()))
{
Manager.GetPortal().sendToHub(event.getPlayer(), "You were kicked from this Mineplex Private Server.");
return;
}
String serverName = Manager.getPlugin().getConfig().getString("serverstatus.name");
UtilPlayer.message(event.getPlayer(), ChatColor.BOLD + "Welcome to Mineplex Private Servers!");