diff options
author | Morgan Humes <mrh9724@lanaddict.com> | 2011-02-25 21:29:42 -0500 |
---|---|---|
committer | Erik Broes <erikbroes@ripe.net> | 2011-03-02 16:51:31 +0100 |
commit | 9a264ed666902c1790287d7659b1f4a0e47f696e (patch) | |
tree | a393a8b9c59af520803738fe190967ef67d5a615 /src/main/java/org/bukkit | |
parent | 1505b4bf3c3da0ea392d2334f197fdfb78579cb0 (diff) | |
download | craftbukkit-9a264ed666902c1790287d7659b1f4a0e47f696e.tar craftbukkit-9a264ed666902c1790287d7659b1f4a0e47f696e.tar.gz craftbukkit-9a264ed666902c1790287d7659b1f4a0e47f696e.tar.lz craftbukkit-9a264ed666902c1790287d7659b1f4a0e47f696e.tar.xz craftbukkit-9a264ed666902c1790287d7659b1f4a0e47f696e.zip |
Implements World.save and Server.savePlayers()
Diffstat (limited to 'src/main/java/org/bukkit')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/CraftServer.java | 6 | ||||
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/CraftWorld.java | 8 |
2 files changed, 13 insertions, 1 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index 703a1fc4..367cff01 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -262,7 +262,7 @@ public final class CraftServer implements Server { } } } - + return new CraftWorld(internal); } @@ -297,4 +297,8 @@ public final class CraftServer implements Server { return null; } } + + public void savePlayers() { + server.d(); + } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java index b0f088b6..e740dea7 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -474,4 +474,12 @@ public class CraftWorld implements World { return list; } + + public void save() { + // Writes level.dat + world.r(); + + // Saves all chunks/regions + world.o.a(true, null); + } } |