Id Files for other Plugins

This commit is contained in:
Sn0wStorm 2013-07-30 22:32:24 +02:00
parent 680d41acd2
commit bad062d4e6
2 changed files with 16 additions and 8 deletions

View File

@ -162,6 +162,14 @@ public class EditWorld {
// World // World
p.copyDirectory(file, new File("DXL_Edit_" + eworld.id)); p.copyDirectory(file, new File("DXL_Edit_" + eworld.id));
// Id File
File idFile = new File("DXL_Edit_" + eworld.id + "/.id_" + name);
try {
idFile.createNewFile();
} catch (IOException e) {
e.printStackTrace();
}
eworld.world = p.getServer().createWorld(WorldCreator.name("DXL_Edit_" + eworld.id)); eworld.world = p.getServer().createWorld(WorldCreator.name("DXL_Edit_" + eworld.id));
try { try {
@ -183,14 +191,6 @@ public class EditWorld {
e.printStackTrace(); e.printStackTrace();
} }
// Id File
File idFile = new File("DXL_Edit_" + eworld.id + "/.id_" + name);
try {
idFile.createNewFile();
} catch (IOException e) {
e.printStackTrace();
}
return eworld; return eworld;
} }

View File

@ -268,6 +268,14 @@ public class GameWorld {
// World // World
p.copyDirectory(file, new File("DXL_Game_" + gworld.id)); p.copyDirectory(file, new File("DXL_Game_" + gworld.id));
// Id File
File idFile = new File("DXL_Game_" + gworld.id + "/.id_" + name);
try {
idFile.createNewFile();
} catch (IOException e) {
e.printStackTrace();
}
gworld.world = p.getServer().createWorld(WorldCreator.name("DXL_Game_" + gworld.id)); gworld.world = p.getServer().createWorld(WorldCreator.name("DXL_Game_" + gworld.id));
ObjectInputStream os; ObjectInputStream os;