Archiviert
1
0

Fixing Server removal

Dieser Commit ist enthalten in:
Travis CI 2019-06-14 18:54:48 +02:00
Ursprung fe98bb72f4
Commit bdf5ec20c6
2 geänderte Dateien mit 2 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -79,12 +79,12 @@ public class Arena implements Runnable{
} }
void stop(){ void stop(){
ProxyServer.getInstance().getServers().remove(serverName);
if(p != null && p.isAlive()){ if(p != null && p.isAlive()){
for(ProxiedPlayer player : server.getPlayers()){ for(ProxiedPlayer player : server.getPlayers()){
player.connect(ProxyServer.getInstance().getServerInfo(BungeeCore.LobbyServer)); player.connect(ProxyServer.getInstance().getServerInfo(BungeeCore.LobbyServer));
} }
writer.println("stop"); writer.println("stop");
ProxyServer.getInstance().getServers().remove(serverName);
ProxyServer.getInstance().getScheduler().runAsync(BungeeCore.instance, ()->{ ProxyServer.getInstance().getScheduler().runAsync(BungeeCore.instance, ()->{
try { try {
p.waitFor(); p.waitFor();

Datei anzeigen

@ -57,13 +57,13 @@ public class BauServer implements Runnable{
} }
public void stop(){ public void stop(){
ProxyServer.getInstance().getServers().remove(name);
if(p != null && p.isAlive()) { if(p != null && p.isAlive()) {
for (ProxiedPlayer player : server.getPlayers()) { for (ProxiedPlayer player : server.getPlayers()) {
player.connect(ProxyServer.getInstance().getServerInfo(BungeeCore.LobbyServer)); player.connect(ProxyServer.getInstance().getServerInfo(BungeeCore.LobbyServer));
} }
stopped = true; stopped = true;
writer.println("stop"); writer.println("stop");
ProxyServer.getInstance().getServers().remove(name);
ProxyServer.getInstance().getScheduler().runAsync(BungeeCore.instance, ()->{ ProxyServer.getInstance().getScheduler().runAsync(BungeeCore.instance, ()->{
try { try {
p.waitFor(); p.waitFor();