Add support for BukkitForge using 'overworld' as the main world name.

This commit is contained in:
ElgarL 2013-01-28 04:13:16 +00:00
parent d26fa6c5b8
commit faad91849d
2 changed files with 17 additions and 8 deletions

View File

@ -209,3 +209,4 @@ v 2.0:
- Synchronize pushing to Bukkit perms to prevent any ConcurrentModificationException.
- Do not grant any permissions (nor update Bukkit) if the server is in offline mode and the player has the permission node 'groupmanager.noofflineperms'.
- Negate 'groupmanager.noofflineperms' by default in the owner group.
- Add support for BukkitForge using 'overworld' as the main world name.

View File

@ -477,14 +477,22 @@ public class WorldsHolder {
private void verifyFirstRun() {
/* 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();
setupWorldFolder(serverDefaultWorldName);
} catch (IOException ex) {
GroupManager.logger.log(Level.SEVERE, null, ex);
}
}
setupWorldFolder(serverDefaultWorldName);
}