mirror of
https://github.com/TotalFreedomMC/TF-EssentialsX.git
synced 2025-04-26 16:39:45 +00:00
[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
This commit is contained in:
parent
2e3841cbdd
commit
592c30f5da
1 changed files with 9 additions and 2 deletions
|
@ -78,8 +78,15 @@ public class Essentials extends JavaPlugin
|
||||||
setStatic();
|
setStatic();
|
||||||
EssentialsUpgrade upgrade = new EssentialsUpgrade(this.getDescription().getVersion(), this);
|
EssentialsUpgrade upgrade = new EssentialsUpgrade(this.getDescription().getVersion(), this);
|
||||||
if (newWorldsLoaded) {
|
if (newWorldsLoaded) {
|
||||||
logger.log(Level.SEVERE, "New worlds have been loaded while upgrading files. Will reload the server.");
|
logger.log(Level.SEVERE, "New worlds have been loaded while upgrading files. The server will stop now, please restart it.");
|
||||||
getServer().reload();
|
try
|
||||||
|
{
|
||||||
|
getServer().dispatchCommand(Console.getCommandSender(getServer()), "stop");
|
||||||
|
}
|
||||||
|
catch (Exception ex)
|
||||||
|
{
|
||||||
|
logger.log(Level.SEVERE, "Failed to stop the server!", ex);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
confList = new ArrayList<IConf>();
|
confList = new ArrayList<IConf>();
|
||||||
settings = new Settings(this.getDataFolder());
|
settings = new Settings(this.getDataFolder());
|
||||||
|
|
Loading…
Reference in a new issue