From 43e36b5bdc63178350c7f0982022954468f9b774 Mon Sep 17 00:00:00 2001 From: EvilSeph Date: Fri, 25 Feb 2011 12:15:43 -0500 Subject: [PATCH] All worlds should be saved on save-all. Player data should be saved when a save occurs. --- src/main/java/net/minecraft/server/ConsoleCommandHandler.java | 2 +- src/main/java/net/minecraft/server/MinecraftServer.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/minecraft/server/ConsoleCommandHandler.java b/src/main/java/net/minecraft/server/ConsoleCommandHandler.java index 53f125a59d..ead8390025 100644 --- a/src/main/java/net/minecraft/server/ConsoleCommandHandler.java +++ b/src/main/java/net/minecraft/server/ConsoleCommandHandler.java @@ -28,7 +28,7 @@ public class ConsoleCommandHandler { this.b.a(); } else if (s.toLowerCase().startsWith("save-all")) { this.a(s1, "Forcing save.."); - worldserver.a(true, (IProgressUpdate) null); + this.b.f(); // CraftBukkit - We should save all worlds on save-all. this.a(s1, "Save complete."); } else if (s.toLowerCase().startsWith("save-off")) { this.a(s1, "Disabling level saving.."); diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java index 71e6a327fa..07cd1d292f 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -198,7 +198,7 @@ public class MinecraftServer implements Runnable, ICommandListener { server.loadPlugins(); // CraftBukkit } - private void f() { + void f() { //CraftBukkit - private -> default a.info("Saving chunks"); // CraftBukkit start @@ -209,6 +209,8 @@ public class MinecraftServer implements Runnable, ICommandListener { WorldEvent event = new WorldEvent( Event.Type.WORLD_SAVED, world.getWorld() ); server.getPluginManager().callEvent( event ); } + + this.f.d(); // CraftBukkit - player data should be saved whenever a save happens. // CraftBukkit end }