public void shutdown() {
		this.heartbeat_thread.stop();
		this.server.running = false;
		if(this.server!=null) {
			this.server.closeServer();
		}
		for(int k=0;k!=this.plugins.size();k++) {
			this.plugins.get(k).onDisable();
		}
		if(this.world.autosave) {
			this.world.saveWorld(new File(this.level_name+".mclevel"));
		}
		this.saveSettings();
		try {
			this.consoleWriter.close();
		} catch (Exception e) {}
		this.log("Server closed");
		System.exit(0);
	}