From bad062d4e6d1be78ceda3eabd9703fa6c5d64ed2 Mon Sep 17 00:00:00 2001 From: Sn0wStorm Date: Tue, 30 Jul 2013 22:32:24 +0200 Subject: [PATCH] Id Files for other Plugins --- src/com/dre/dungeonsxl/EditWorld.java | 16 ++++++++-------- src/com/dre/dungeonsxl/game/GameWorld.java | 8 ++++++++ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/com/dre/dungeonsxl/EditWorld.java b/src/com/dre/dungeonsxl/EditWorld.java index 726c929c..bc85652e 100644 --- a/src/com/dre/dungeonsxl/EditWorld.java +++ b/src/com/dre/dungeonsxl/EditWorld.java @@ -162,6 +162,14 @@ public class EditWorld { // World 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)); try { @@ -183,14 +191,6 @@ public class EditWorld { e.printStackTrace(); } - // Id File - File idFile = new File("DXL_Edit_" + eworld.id + "/.id_" + name); - try { - idFile.createNewFile(); - } catch (IOException e) { - e.printStackTrace(); - } - return eworld; } diff --git a/src/com/dre/dungeonsxl/game/GameWorld.java b/src/com/dre/dungeonsxl/game/GameWorld.java index d83045ff..0e00366a 100644 --- a/src/com/dre/dungeonsxl/game/GameWorld.java +++ b/src/com/dre/dungeonsxl/game/GameWorld.java @@ -268,6 +268,14 @@ public class GameWorld { // World 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)); ObjectInputStream os;