Copy edit world before saving sign data

This commit is contained in:
Daniel Saukel 2016-01-16 11:09:46 +01:00
parent 4391330bc7
commit 88ace289bd

View File

@ -87,6 +87,10 @@ public class EditWorld {
world.save(); world.save();
File dir = new File("DXL_Edit_" + id);
FileUtil.copyDirectory(dir, new File(plugin.getDataFolder(), "/maps/" + mapName));
FileUtil.deleteUnusedFiles(new File(plugin.getDataFolder(), "/maps/" + mapName));
try { try {
ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(new File(plugin.getDataFolder(), "/maps/" + mapName + "/DXLData.data"))); ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(new File(plugin.getDataFolder(), "/maps/" + mapName + "/DXLData.data")));
out.writeInt(sign.size()); out.writeInt(sign.size());