From 29c5dc34075ae41317c8de745f0be1be17ce8814 Mon Sep 17 00:00:00 2001 From: Lixfel Date: Sat, 3 Apr 2021 09:06:00 +0200 Subject: [PATCH] Fix wait for termination Signed-off-by: Lixfel --- src/de/steamwar/bungeecore/listeners/ConnectionListener.java | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/de/steamwar/bungeecore/listeners/ConnectionListener.java b/src/de/steamwar/bungeecore/listeners/ConnectionListener.java index 7f0f88f..309db1b 100644 --- a/src/de/steamwar/bungeecore/listeners/ConnectionListener.java +++ b/src/de/steamwar/bungeecore/listeners/ConnectionListener.java @@ -30,9 +30,6 @@ import de.steamwar.bungeecore.sql.UserGroup; import net.md_5.bungee.api.AbstractReconnectHandler; import net.md_5.bungee.api.ProxyServer; import net.md_5.bungee.api.chat.ClickEvent; -import net.md_5.bungee.api.chat.ComponentBuilder; -import net.md_5.bungee.api.chat.HoverEvent; -import net.md_5.bungee.api.chat.TextComponent; import net.md_5.bungee.api.config.ServerInfo; import net.md_5.bungee.api.connection.ProxiedPlayer; import net.md_5.bungee.api.event.PlayerDisconnectEvent; @@ -139,6 +136,6 @@ public class ConnectionListener extends BasicListener { ProxiedPlayer player = e.getPlayer(); Collection players = server.getPlayers(); if(players.isEmpty() || (players.size() == 1 && players.contains(player))) - ProxyServer.getInstance().getScheduler().runAsync(BungeeCore.get(), subserver::stop); + ProxyServer.getInstance().getScheduler().runAsync(BungeeCore.get(), subserver::waitForTermination); } }