mirror of
https://github.com/mcMMO-Dev/mcMMO.git
synced 2025-01-30 19:41:24 +01:00
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
This commit is contained in:
parent
67499eeff7
commit
8dfa8c20f3
@ -107,6 +107,8 @@ public class HashChunkletManager implements ChunkletManager {
|
|||||||
public void saveWorld(World world) {
|
public void saveWorld(World world) {
|
||||||
String worldName = world.getName();
|
String worldName = world.getName();
|
||||||
File dataDir = new File(world.getWorldFolder(), "mcmmo_data");
|
File dataDir = new File(world.getWorldFolder(), "mcmmo_data");
|
||||||
|
if(!dataDir.exists())
|
||||||
|
dataDir.mkdirs();
|
||||||
|
|
||||||
for(String key : store.keySet()) {
|
for(String key : store.keySet()) {
|
||||||
String[] info = key.split(",");
|
String[] info = key.split(",");
|
||||||
@ -280,6 +282,8 @@ public class HashChunkletManager implements ChunkletManager {
|
|||||||
ObjectOutputStream objOut = null;
|
ObjectOutputStream objOut = null;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
if(!location.exists())
|
||||||
|
location.createNewFile();
|
||||||
fileOut = new FileOutputStream(location);
|
fileOut = new FileOutputStream(location);
|
||||||
objOut = new ObjectOutputStream(fileOut);
|
objOut = new ObjectOutputStream(fileOut);
|
||||||
objOut.writeObject(cStore);
|
objOut.writeObject(cStore);
|
||||||
|
Loading…
Reference in New Issue
Block a user