public static void unloadAll(FMLServerStoppingEvent serverStoppingEvent) { File worldFile = new File(FMLCommonHandler.instance().getSavesDirectory(), FMLCommonHandler.instance().getMinecraftServerInstance().getFolderName()); File dataFile = new File(worldFile, fileName); if (dimDataList == null || dimDataList.isEmpty()) { return; } Gson gson = new GsonBuilder().setPrettyPrinting().create(); String json = gson.toJson(dimDataList); try { if (dataFile.exists()) { dataFile.delete(); } FileUtils.writeStringToFile(dataFile, json); } catch (IOException e) { e.printStackTrace(); } for (DimData data : dimDataList) { DimensionManager.unloadWorld(data.id); DimensionManager.unregisterDimension(data.id); } dimDataList.clear(); dimDataHashMap.clear(); }
@EventHandler public void serverStopping(FMLServerStoppingEvent event) { // cancel running tasks SessionManager.getInstance().getAllSessions().forEachRemaining(sess -> { sess.taskManager.cancelTasks(); }); SessionManager.getInstance().clearAllSessions(); }
@Mod.EventHandler public void serverStopping(FMLServerStoppingEvent event) { if (!CreeperHost.instance.active) return; serverOn = false; serializePreload(); pregenTasks.clear(); }
@Mod.EventHandler public void serverStop(FMLServerStoppingEvent event) { //MapList.nameToData.clear(); //MapList.buildInAttributes.clear(); File output = new File(((AnvilSaveConverter) server.getActiveAnvilConverter()).savesDirectory, server.getFolderName() + "/teleports.dat"); NBTTagCompound tagRoot = new NBTTagCompound(); NBTTagCompound tag = new NBTTagCompound(); tagRoot.setTag("Teleporters", tag); for (Entry<UUID, TeleporterData[]> entry : EntityTeleporter.teleporters.entrySet()) { NBTTagCompound exitTag = new NBTTagCompound(); for (int i = 0; i < EntityTeleporter.TP_PER_PLAYER; i++) { TeleporterData blockPos = entry.getValue()[i]; if (blockPos != null) exitTag.setIntArray(Integer.toString(i), new int[] { blockPos.getX(), blockPos.getY(), blockPos.getZ(), blockPos.id, blockPos.dimension}); } tag.setTag(entry.getKey().toString(), exitTag); } tagRoot.setInteger("TPCount", EntityTeleporter.tpCount); try { CompressedStreamTools.writeCompressed(tagRoot, new FileOutputStream(output)); } catch (IOException e) { e.printStackTrace(); } EntityTeleporter.teleporters.clear(); EntityTeleporter.tpCount = 0; if(udpServer != null) { udpServer.stopServer(); udpServer = null; } }
@Mod.EventHandler @SideOnly(Side.SERVER) public void serverStop(FMLServerStoppingEvent event) { DynMapFeatures.removeAllBorders(); Config.storeFillTask(); }
@EventHandler public static void onServerStop(FMLServerStoppingEvent event) { log.info("Stopping the Server"); PlayerHandler.cleanup(); if (isMapEnabled) Minimap.close(); WorldHandler.stopServer(); TomsModUtils.setServer(null); log.info("Server Stopped"); }
@Mod.EventHandler public void serverStopping(FMLServerStoppingEvent event) { // Calling this method destroys all server instances that exist, // because the 'event' given above does NOT give us the server-instance that is being stopped. ServerHandler.destroyServerMirror(null); }
@Mod.EventHandler public void onServerStopping(FMLServerStoppingEvent event){ if(event.getSide()==Side.CLIENT){ //when the server stops (hopefully this is the right event), save the state of the clock ModLogger.logInfo("Saving clock state for the next reload"); ConfigurationHandler.setValueDisplay(Clock.isEnabled()); } }
@EventHandler @SideOnly(Side.SERVER) public void onServerStopping(FMLServerStoppingEvent event) { if (senderConnected) { slackSender.sendToSlack(SlackCommandSender.getInstance(), Messages.General.SERVER_STOPPED); } }
@EventHandler public void serverStop(FMLServerStoppingEvent event) { log.info("[Cannibalism] Writing playerdata to file..."); io.write(data.getDatabase()); log.info("[Cannibalism] Completed"); }
@EventHandler public void onServerStopping(FMLServerStoppingEvent event){ _dal.stopAllThreads(); for (WorldServer ws : MinecraftServer.getServer().worldServers){ ClaimManager.instance.saveAllClaims(ws); } }
@EventHandler public void serverStopping(FMLServerStoppingEvent event) { SaveHandler.saveFactionsToFile(); }
@EventHandler public void serverStopping(FMLServerStoppingEvent event) { SaveHandler.saveFactionsToFile(Main.configDir, Main.worldDir, TerritoryHandler.getSaveData()); }
@EventHandler public void serverStopping(@Nonnull final FMLServerStoppingEvent event) { proxy.serverStopping(event); }
@EventHandler public void serverStopping(FMLServerStoppingEvent event) { CommonProxy.manager.reset(); }
@Mod.EventHandler public void serverStopping(FMLServerStoppingEvent event) { eventHandlerServer.headlessHarmer.clear(); eventHandlerServer.headlessTime.clear(); }
@Mod.EventHandler public void serverStopping(final FMLServerStoppingEvent event) { proxy.serverStopping(event); }
/** * Called from the main mod class to do stuff before the server is stopping */ protected void serverStopping(FMLServerStoppingEvent event) { this.handler.onStateEvent(event); }
@Mod.EventHandler public void serverStopping(FMLServerStoppingEvent event) { Game.events().publish(new ServerEvent.Stop()); }
@Mod.EventHandler public void onServerStopping(FMLServerStoppingEvent event) { BarkHelper.cooldown.clear(); BarkHelper.pressState.clear(); }
@Mod.EventHandler public void serverStopping(FMLServerStoppingEvent event) { for (EntityPlayerMP player : (List<EntityPlayerMP>)FMLCommonHandler.instance().getMinecraftServerInstance().getPlayerList().getPlayerList()) { handleQuit(player); } }
@Mod.EventHandler public void serverStopping(FMLServerStoppingEvent event) { for (EntityPlayerMP player : (List<EntityPlayerMP>)MinecraftServer.getServer().getConfigurationManager().playerEntityList) { handleQuit(player); } }
@Mod.EventHandler public void serverStopping(FMLServerStoppingEvent event) { for (EntityPlayerMP player : FMLCommonHandler.instance().getMinecraftServerInstance().getPlayerList().getPlayers()) { handleQuit(player); } }
@Mod.EventHandler public void serverShuttingDown(FMLServerStoppingEvent event) { eventHandlerServer.playerKills.clear(); }
@EventHandler public void serverStopping(FMLServerStoppingEvent event) { proxy.serverStopping(event); }
public void serverStopping(FMLServerStoppingEvent event) { Simulator.instance().stop(); }
@EventHandler public void cleanup(FMLServerStoppingEvent event){ proxy.cleanup(); }
public void serverStopping(final FMLServerStoppingEvent event) { }
public void serverStopping(@Nonnull final FMLServerStoppingEvent event) { }