mirror of
https://github.com/ProjectSWGCore/NGECore2.git
synced 2026-08-01 02:16:15 -04:00
Configured /server admin command for server related needs.
Added initiateStop to NGECore.
This commit is contained in:
+19
-1
@@ -796,8 +796,26 @@ public class NGECore {
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void initiateStop() {
|
||||
if(isShuttingDown)
|
||||
return;
|
||||
try {
|
||||
chatService.broadcastGalaxy("You will now be disconnected so the server can perform a final save before shutting down.");
|
||||
Thread.sleep(10000);
|
||||
synchronized(getActiveConnectionsMap()) {
|
||||
for(Client client : getActiveConnectionsMap().values()) {
|
||||
client.getSession().close(true);
|
||||
connectionService.disconnect(client);
|
||||
}
|
||||
}
|
||||
|
||||
System.exit(0);
|
||||
|
||||
} catch (InterruptedException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user