summaryrefslogtreecommitdiffstats
path: root/src/main
diff options
context:
space:
mode:
authorEvilSeph <evilseph@unaligned.org>2011-05-16 20:18:09 -0400
committerEvilSeph <evilseph@unaligned.org>2011-05-16 20:27:06 -0400
commitbc5924bbc58112d655756d38f109c0d0875ef202 (patch)
tree9a671d1711773ef00d44efced98f1c03286e49b6 /src/main
parent605bfd972f5839935a73bc1ce6459487e875b9ee (diff)
downloadcraftbukkit-bc5924bbc58112d655756d38f109c0d0875ef202.tar
craftbukkit-bc5924bbc58112d655756d38f109c0d0875ef202.tar.gz
craftbukkit-bc5924bbc58112d655756d38f109c0d0875ef202.tar.lz
craftbukkit-bc5924bbc58112d655756d38f109c0d0875ef202.tar.xz
craftbukkit-bc5924bbc58112d655756d38f109c0d0875ef202.zip
Made the save-all modification respect the original save state.
Diffstat (limited to 'src/main')
-rw-r--r--src/main/java/net/minecraft/server/ConsoleCommandHandler.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/ConsoleCommandHandler.java b/src/main/java/net/minecraft/server/ConsoleCommandHandler.java
index 96b3c2d8..eb48f2d9 100644
--- a/src/main/java/net/minecraft/server/ConsoleCommandHandler.java
+++ b/src/main/java/net/minecraft/server/ConsoleCommandHandler.java
@@ -30,9 +30,10 @@ public class ConsoleCommandHandler {
this.server.a();
} else if (s.toLowerCase().startsWith("save-all")) {
this.print(s1, "Forcing save..");
+ boolean save = worldserver.y; // CraftBukkit - record current save flag state.
worldserver.y = false; // CraftBukkit - If save-all is used, we can assume saving should be turned on to allow for saving.
this.server.saveChunks(); // CraftBukkit - We should save all worlds on save-all.
- worldserver.y = true; // CraftBukkit - Once done saving, we should turn it back off to avoid confusion.
+ worldserver.y = save; // CraftBukkit start - Once done saving, we should turn it back off to avoid confusion if it was originally off.
this.print(s1, "Save complete.");
} else if (s.toLowerCase().startsWith("save-off")) {
this.print(s1, "Disabling level saving..");