/** par1 indicates if a log message should be output. */ protected void saveAllWorlds(boolean dontLog) { if (!this.worldIsBeingDeleted) { WorldServer[] var2 = this.worldServers; int var3 = var2.length; for (int var4 = 0; var4 < var3; ++var4) { WorldServer var5 = var2[var4]; if (var5 != null) { if (!dontLog) { logger.info( "Saving chunks for level \'" + var5.getWorldInfo().getWorldName() + "\'/" + var5.provider.getDimensionName()); } try { var5.saveAllChunks(true, (IProgressUpdate) null); } catch (MinecraftException var7) { logger.warn(var7.getMessage()); } } } } }
public void processCommand(ICommandSender par1ICommandSender, String[] par2ArrayOfStr) { MinecraftServer var3 = MinecraftServer.getServer(); par1ICommandSender.sendChatToPlayer( par1ICommandSender.translateString("commands.save.start", new Object[0])); if (var3.getConfigurationManager() != null) { var3.getConfigurationManager().saveAllPlayerData(); } try { for (int var4 = 0; var4 < var3.worldServers.length; ++var4) { if (var3.worldServers[var4] != null) { WorldServer var5 = var3.worldServers[var4]; boolean var6 = var5.levelSaving; var5.levelSaving = false; var5.saveAllChunks(true, (IProgressUpdate) null); var5.levelSaving = var6; } } } catch (MinecraftException var7) { notifyAdmins(par1ICommandSender, "commands.save.failed", new Object[] {var7.getMessage()}); return; } notifyAdmins(par1ICommandSender, "commands.save.success", new Object[0]); }