diff options
author | ElgarL <ElgarL@palmergames.com> | 2013-01-28 04:13:16 +0000 |
---|---|---|
committer | ElgarL <ElgarL@palmergames.com> | 2013-01-28 04:13:16 +0000 |
commit | faad91849d6e244c4a95b5288a778f67af8831c7 (patch) | |
tree | e5b5d26b7f240629201e2b284d32e2d0bbaccb06 /EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds | |
parent | d26fa6c5b8d983832a8c8326767fd50dc60eb3cc (diff) | |
download | Essentials-faad91849d6e244c4a95b5288a778f67af8831c7.tar Essentials-faad91849d6e244c4a95b5288a778f67af8831c7.tar.gz Essentials-faad91849d6e244c4a95b5288a778f67af8831c7.tar.lz Essentials-faad91849d6e244c4a95b5288a778f67af8831c7.tar.xz Essentials-faad91849d6e244c4a95b5288a778f67af8831c7.zip |
Add support for BukkitForge using 'overworld' as the main world name.
Diffstat (limited to 'EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds')
-rw-r--r-- | EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java index 12a6a5150..2661c6bc0 100644 --- a/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java +++ b/EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java @@ -477,14 +477,22 @@ public class WorldsHolder { private void verifyFirstRun() { - Properties server = new Properties(); - try { - server.load(new FileInputStream(new File("server.properties"))); - serverDefaultWorldName = server.getProperty("level-name").toLowerCase(); - setupWorldFolder(serverDefaultWorldName); - } catch (IOException ex) { - GroupManager.logger.log(Level.SEVERE, null, ex); + /* Do not use the folder name if this + * is a Bukkit Forge server. + */ + if (plugin.getServer().getName().equalsIgnoreCase("BukkitForge")) { + serverDefaultWorldName = "overworld"; + + } else { + Properties server = new Properties(); + try { + server.load(new FileInputStream(new File("server.properties"))); + serverDefaultWorldName = server.getProperty("level-name").toLowerCase(); + } catch (IOException ex) { + GroupManager.logger.log(Level.SEVERE, null, ex); + } } + setupWorldFolder(serverDefaultWorldName); } |