From bdf5ec20c6a02a55cc5eb19a2699451168b41633 Mon Sep 17 00:00:00 2001 From: Travis CI Date: Fri, 14 Jun 2019 18:54:48 +0200 Subject: [PATCH] Fixing Server removal --- src/de/steamwar/bungeecore/arenasystem/Arena.java | 2 +- src/de/steamwar/bungeecore/bausystem/BauServer.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/de/steamwar/bungeecore/arenasystem/Arena.java b/src/de/steamwar/bungeecore/arenasystem/Arena.java index eddf6efb..c2599df8 100644 --- a/src/de/steamwar/bungeecore/arenasystem/Arena.java +++ b/src/de/steamwar/bungeecore/arenasystem/Arena.java @@ -79,12 +79,12 @@ public class Arena implements Runnable{ } void stop(){ + ProxyServer.getInstance().getServers().remove(serverName); if(p != null && p.isAlive()){ for(ProxiedPlayer player : server.getPlayers()){ player.connect(ProxyServer.getInstance().getServerInfo(BungeeCore.LobbyServer)); } writer.println("stop"); - ProxyServer.getInstance().getServers().remove(serverName); ProxyServer.getInstance().getScheduler().runAsync(BungeeCore.instance, ()->{ try { p.waitFor(); diff --git a/src/de/steamwar/bungeecore/bausystem/BauServer.java b/src/de/steamwar/bungeecore/bausystem/BauServer.java index bac05fea..eb960bb3 100644 --- a/src/de/steamwar/bungeecore/bausystem/BauServer.java +++ b/src/de/steamwar/bungeecore/bausystem/BauServer.java @@ -57,13 +57,13 @@ public class BauServer implements Runnable{ } public void stop(){ + ProxyServer.getInstance().getServers().remove(name); if(p != null && p.isAlive()) { for (ProxiedPlayer player : server.getPlayers()) { player.connect(ProxyServer.getInstance().getServerInfo(BungeeCore.LobbyServer)); } stopped = true; writer.println("stop"); - ProxyServer.getInstance().getServers().remove(name); ProxyServer.getInstance().getScheduler().runAsync(BungeeCore.instance, ()->{ try { p.waitFor();