diff --git a/src/de/steamwar/bungeecore/BungeeCore.java b/src/de/steamwar/bungeecore/BungeeCore.java index c0656a5a..bf1cd684 100644 --- a/src/de/steamwar/bungeecore/BungeeCore.java +++ b/src/de/steamwar/bungeecore/BungeeCore.java @@ -309,8 +309,6 @@ public class BungeeCore extends Plugin { EVENT_MODE = config.getBoolean("eventmode"); Broadcaster.setBroadCastMsgs(config.getStringList("broadcasts").toArray(new String[1])); PollSystem.init(config.getString("poll.question"), config.getStringList("poll.answers")); - Persistent.setChatPrefix(CHAT_PREFIX); - Persistent.setLobbyServer(LOBBY_SERVER); final Configuration servers = config.getSection("servers"); for(final String serverName : servers.getKeys()){ diff --git a/src/de/steamwar/bungeecore/listeners/ConnectionListener.java b/src/de/steamwar/bungeecore/listeners/ConnectionListener.java index 012b9489..8c2e519d 100644 --- a/src/de/steamwar/bungeecore/listeners/ConnectionListener.java +++ b/src/de/steamwar/bungeecore/listeners/ConnectionListener.java @@ -39,11 +39,13 @@ import net.md_5.bungee.api.config.ServerInfo; import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.api.event.PlayerDisconnectEvent; import net.md_5.bungee.api.event.PostLoginEvent; -import net.md_5.bungee.api.event.ServerDisconnectEvent; import net.md_5.bungee.api.event.ServerKickEvent; import net.md_5.bungee.event.EventHandler; -import java.util.*; +import java.util.HashSet; +import java.util.Iterator; +import java.util.Set; +import java.util.UUID; public class ConnectionListener extends BasicListener { @@ -153,17 +155,4 @@ public class ConnectionListener extends BasicListener { Utils.playerModMap.remove(e.getPlayer().getUniqueId()); ModCommand.playerFilterType.remove(e.getPlayer()); } - - @EventHandler - public void onServerDisconnect(ServerDisconnectEvent e){ - ServerInfo server = e.getTarget(); - Subserver subserver = Subserver.getSubserver(server); - if(subserver == null) - return; - - ProxiedPlayer player = e.getPlayer(); - Collection players = server.getPlayers(); - if(players.isEmpty() || (players.size() == 1 && players.contains(player))) - ProxyServer.getInstance().getScheduler().runAsync(BungeeCore.get(), subserver::waitForTermination); - } }