geforkt von SteamWar/BungeeCore
Fixing Server removal
Dieser Commit ist enthalten in:
Ursprung
fe98bb72f4
Commit
bdf5ec20c6
@ -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();
|
||||||
|
@ -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();
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren