From 8dfa8c20f32e391c3d299abc51514a6601ed6e80 Mon Sep 17 00:00:00 2001 From: "U-YUE\\Sean" Date: Tue, 30 Oct 2012 10:26:46 -0700 Subject: [PATCH] Resolving first half of issue #283 . Recommend closing issue and reopening with a new ticket number for the issue regarding stats. Stat bug probably involves commit @42aa42699129448ef7fa0e4e5de96840004c13ee --- .../com/gmail/nossr50/util/blockmeta/HashChunkletManager.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/main/java/com/gmail/nossr50/util/blockmeta/HashChunkletManager.java b/src/main/java/com/gmail/nossr50/util/blockmeta/HashChunkletManager.java index c3c8ffe4e..bc0899730 100644 --- a/src/main/java/com/gmail/nossr50/util/blockmeta/HashChunkletManager.java +++ b/src/main/java/com/gmail/nossr50/util/blockmeta/HashChunkletManager.java @@ -107,6 +107,8 @@ public class HashChunkletManager implements ChunkletManager { public void saveWorld(World world) { String worldName = world.getName(); File dataDir = new File(world.getWorldFolder(), "mcmmo_data"); + if(!dataDir.exists()) + dataDir.mkdirs(); for(String key : store.keySet()) { String[] info = key.split(","); @@ -280,6 +282,8 @@ public class HashChunkletManager implements ChunkletManager { ObjectOutputStream objOut = null; try { + if(!location.exists()) + location.createNewFile(); fileOut = new FileOutputStream(location); objOut = new ObjectOutputStream(fileOut); objOut.writeObject(cStore);