All pastes #329402 Raw Edit

Untitled

public text v1 · immutable
#329402 ·published 2007-01-26 18:45 UTC
rendered paste body
	public void run() {
		// disallow new logins
		try {
            //Doesnt actually do anything
			//Server.gameServer.getLoginController().setMaxAllowedOnlinePlayers(0);
		} catch (Throwable t) {}
		if (this == _instance) {
			try {
				LoginServer.getInstance().shutdown(true);
			} catch (Throwable t) {}
			
			// ensure all services are stopped
			try {
				GameTimeController.getInstance().stopTimer();
			} catch (Throwable t) {}
			// stop all threadpolls
			try {
				ThreadPoolManager.getInstance().shutdown();
			} catch (Throwable t) {}
			// last byebye, save all data and quit this server
			// logging doesnt work here :(
			saveData();