mirror of
https://github.com/DRE2N/DungeonsXL.git
synced 2024-11-09 20:31:28 +01:00
parent
52a049d5f3
commit
b73b7d5554
@ -262,7 +262,9 @@ public class DResourceWorld {
|
||||
}
|
||||
}
|
||||
|
||||
return (DEditWorld) instantiate(false);
|
||||
DEditWorld editWorld = (DEditWorld) instantiate(false);
|
||||
editWorld.generateIdFile();
|
||||
return editWorld;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -295,6 +297,7 @@ public class DResourceWorld {
|
||||
|
||||
if (!plugin.getMainConfig().areTweaksEnabled()) {
|
||||
editWorld.world = creator.createWorld();
|
||||
editWorld.generateIdFile();
|
||||
|
||||
} else {
|
||||
new BukkitRunnable() {
|
||||
|
@ -212,8 +212,20 @@ public class DWorldCache {
|
||||
if (mapFile.getName().startsWith(".id_")) {
|
||||
String name = mapFile.getName().substring(4);
|
||||
|
||||
FileUtil.copyDir(file, new File(DungeonsXL.MAPS, name), DungeonsXL.EXCLUDED_FILES);
|
||||
deleteUnusedFiles(new File(DungeonsXL.MAPS, name));
|
||||
File resource = new File(DungeonsXL.MAPS, name);
|
||||
File backup = new File(DungeonsXL.BACKUPS, resource.getName() + "-" + System.currentTimeMillis() + "_crashbackup");
|
||||
FileUtil.copyDir(resource, backup);
|
||||
remove:
|
||||
for (File remove : FileUtil.getFilesForFolder(resource)) {
|
||||
for (String nope : DungeonsXL.EXCLUDED_FILES) {
|
||||
if (remove.getName().equals(nope)) {
|
||||
continue remove;
|
||||
}
|
||||
}
|
||||
remove.delete();
|
||||
}
|
||||
deleteUnusedFiles(file);
|
||||
FileUtil.copyDir(file, resource, DungeonsXL.EXCLUDED_FILES);
|
||||
|
||||
FileUtil.removeDir(file);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user