diff options
author | sunkid <sunkid@iminurnetz.com> | 2011-06-23 11:06:09 -0700 |
---|---|---|
committer | EvilSeph <evilseph@unaligned.org> | 2011-06-23 14:35:05 -0400 |
commit | 6e746ef79a30db37ec1134b5a1717dd9da15d797 (patch) | |
tree | 6304c5f60ae6a24b73da9417c310aef35b7b41bb | |
parent | ebfd973d09a87b8f7cc6314935e876d864d1eab6 (diff) | |
download | craftbukkit-6e746ef79a30db37ec1134b5a1717dd9da15d797.tar craftbukkit-6e746ef79a30db37ec1134b5a1717dd9da15d797.tar.gz craftbukkit-6e746ef79a30db37ec1134b5a1717dd9da15d797.tar.lz craftbukkit-6e746ef79a30db37ec1134b5a1717dd9da15d797.tar.xz craftbukkit-6e746ef79a30db37ec1134b5a1717dd9da15d797.zip |
Made bukkit settings reload on reload().
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/CraftServer.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java index 2c41e0d4..b0c8d908 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -85,14 +85,13 @@ public final class CraftServer implements Server { Logger.getLogger("Minecraft").log(Level.INFO, "This server is running " + getName() + " version " + getVersion()); configuration = new Configuration((File) console.options.valueOf("bukkit-settings")); - configuration.load(); - loadConfigDefaults(); - configuration.save(); + loadConfig(); loadPlugins(); enablePlugins(PluginLoadOrder.STARTUP); } - private void loadConfigDefaults() { + private void loadConfig() { + configuration.load(); configuration.getString("database.url", "jdbc:sqlite:{DIR}{NAME}.db"); configuration.getString("database.username", "bukkit"); configuration.getString("database.password", "walrus"); @@ -107,6 +106,7 @@ public final class CraftServer implements Server { icanhasbukkit.add("version"); configuration.setProperty("aliases.icanhasbukkit", icanhasbukkit); } + configuration.save(); } public void loadPlugins() { @@ -311,6 +311,7 @@ public final class CraftServer implements Server { } public void reload() { + loadConfig(); PropertyManager config = new PropertyManager(console.options); console.propertyManager = config; |