- Fixed blacklisting to stop join spam
This commit is contained in:
parent
a4853e667c
commit
2b365e4afd
@ -205,7 +205,7 @@ public class GameHostManager implements Listener
|
|||||||
}
|
}
|
||||||
|
|
||||||
@EventHandler
|
@EventHandler
|
||||||
public void whitelistJoin(PlayerLoginEvent event)
|
public void handleLogin(PlayerLoginEvent event)
|
||||||
{
|
{
|
||||||
Player p = event.getPlayer();
|
Player p = event.getPlayer();
|
||||||
if (Manager.GetServerConfig().PlayerServerWhitelist){
|
if (Manager.GetServerConfig().PlayerServerWhitelist){
|
||||||
@ -217,6 +217,8 @@ public class GameHostManager implements Listener
|
|||||||
event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, "This MPS is whitelisted.");
|
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
|
@EventHandler
|
||||||
@ -786,12 +788,6 @@ public class GameHostManager implements Listener
|
|||||||
{
|
{
|
||||||
if (!isPrivateServer())
|
if (!isPrivateServer())
|
||||||
return;
|
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");
|
String serverName = Manager.getPlugin().getConfig().getString("serverstatus.name");
|
||||||
UtilPlayer.message(event.getPlayer(), ChatColor.BOLD + "Welcome to Mineplex Private Servers!");
|
UtilPlayer.message(event.getPlayer(), ChatColor.BOLD + "Welcome to Mineplex Private Servers!");
|
||||||
|
Loading…
Reference in New Issue
Block a user