summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorElgarL <ElgarL@palmergames.com>2013-01-28 04:13:16 +0000
committerElgarL <ElgarL@palmergames.com>2013-01-28 04:13:16 +0000
commitfaad91849d6e244c4a95b5288a778f67af8831c7 (patch)
treee5b5d26b7f240629201e2b284d32e2d0bbaccb06
parentd26fa6c5b8d983832a8c8326767fd50dc60eb3cc (diff)
downloadEssentials-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.
-rw-r--r--EssentialsGroupManager/src/Changelog.txt3
-rw-r--r--EssentialsGroupManager/src/org/anjocaido/groupmanager/dataholder/worlds/WorldsHolder.java22
2 files changed, 17 insertions, 8 deletions
diff --git a/EssentialsGroupManager/src/Changelog.txt b/EssentialsGroupManager/src/Changelog.txt
index 014b4b9ea..fe443e2a4 100644
--- a/EssentialsGroupManager/src/Changelog.txt
+++ b/EssentialsGroupManager/src/Changelog.txt
@@ -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. \ No newline at end of file
+ - Negate 'groupmanager.noofflineperms' by default in the owner group.
+ - Add support for BukkitForge using 'overworld' as the main world name. \ No newline at end of file
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);
}