From 2b365e4afd6bf80a7957fc0e035e45c38f05e781 Mon Sep 17 00:00:00 2001 From: AlexTheCoder Date: Sat, 2 Jan 2016 14:35:05 -0500 Subject: [PATCH] - Fixed blacklisting to stop join spam --- .../nautilus/game/arcade/managers/GameHostManager.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameHostManager.java b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameHostManager.java index 50a838155..90aa00660 100644 --- a/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameHostManager.java +++ b/Plugins/Nautilus.Game.Arcade/src/nautilus/game/arcade/managers/GameHostManager.java @@ -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!");