summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDinnerbone <dinnerbone@dinnerbone.com>2011-09-02 20:46:26 +0100
committerDinnerbone <dinnerbone@dinnerbone.com>2011-09-02 20:46:26 +0100
commit7c491b7bc7344da33c47b23088de2b2a3d0a67ca (patch)
tree662d99190aa7d95247f33f8dac344e49be1e3956
parent0c20045964fc67a998d3b53baa148dd4f08d7715 (diff)
downloadcraftbukkit-7c491b7bc7344da33c47b23088de2b2a3d0a67ca.tar
craftbukkit-7c491b7bc7344da33c47b23088de2b2a3d0a67ca.tar.gz
craftbukkit-7c491b7bc7344da33c47b23088de2b2a3d0a67ca.tar.lz
craftbukkit-7c491b7bc7344da33c47b23088de2b2a3d0a67ca.tar.xz
craftbukkit-7c491b7bc7344da33c47b23088de2b2a3d0a67ca.zip
Fixed world.save, implemented autosave methods
-rw-r--r--src/main/java/org/bukkit/craftbukkit/CraftWorld.java17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 23d45a6d..0faf610e 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -567,11 +567,20 @@ public class CraftWorld implements World {
}
public void save() {
- // Writes level.dat
- world.saveLevel();
+ boolean oldSave = world.canSave;
- // Saves all chunks/regions
- world.chunkProvider.saveChunks(true, null);
+ world.canSave = false;
+ world.save(true, null);
+
+ world.canSave = oldSave;
+ }
+
+ public boolean isAutoSave() {
+ return !world.canSave;
+ }
+
+ public void setAutoSave(boolean value) {
+ world.canSave = !value;
}
public boolean hasStorm() {