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

@ -208,4 +208,5 @@ v 2.0:
- Synchronize the raising of GroupManager events to Bukkit.getServer() (should prevent deadlocks).
- 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.
- 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() {
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);
}