summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsnowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-05-02 16:57:19 +0000
committersnowleo <snowleo@e251c2fe-e539-e718-e476-b85c1f46cddb>2011-05-02 16:57:19 +0000
commit592c30f5da9d565d438cea482e2d941d15f72f26 (patch)
tree6b310f21c8319cdfbcb6142cd357d19d632bc616
parent2e3841cbdd1810bc0578b47ed0d0c92c30f31644 (diff)
downloadEssentials-592c30f5da9d565d438cea482e2d941d15f72f26.tar
Essentials-592c30f5da9d565d438cea482e2d941d15f72f26.tar.gz
Essentials-592c30f5da9d565d438cea482e2d941d15f72f26.tar.lz
Essentials-592c30f5da9d565d438cea482e2d941d15f72f26.tar.xz
Essentials-592c30f5da9d565d438cea482e2d941d15f72f26.zip
[trunk] Stop the server instead of reloading, since reloading does not unload worlds.
This for compatibility to other multiworld plugins, since we load all unloaded worlds as normal worlds. git-svn-id: https://svn.java.net/svn/essentials~svn/trunk@1319 e251c2fe-e539-e718-e476-b85c1f46cddb
-rw-r--r--Essentials/src/com/earth2me/essentials/Essentials.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/Essentials/src/com/earth2me/essentials/Essentials.java b/Essentials/src/com/earth2me/essentials/Essentials.java
index 3f51c75d5..8f32b85c8 100644
--- a/Essentials/src/com/earth2me/essentials/Essentials.java
+++ b/Essentials/src/com/earth2me/essentials/Essentials.java
@@ -78,8 +78,15 @@ public class Essentials extends JavaPlugin
setStatic();
EssentialsUpgrade upgrade = new EssentialsUpgrade(this.getDescription().getVersion(), this);
if (newWorldsLoaded) {
- logger.log(Level.SEVERE, "New worlds have been loaded while upgrading files. Will reload the server.");
- getServer().reload();
+ logger.log(Level.SEVERE, "New worlds have been loaded while upgrading files. The server will stop now, please restart it.");
+ try
+ {
+ getServer().dispatchCommand(Console.getCommandSender(getServer()), "stop");
+ }
+ catch (Exception ex)
+ {
+ logger.log(Level.SEVERE, "Failed to stop the server!", ex);
+ }
}
confList = new ArrayList<IConf>();
settings = new Settings(this.getDataFolder());