Fix auto-updater failing
- Implemented a new self-reload system, which will boot up a separate plugin to load ServerUtils back up again.
This commit is contained in:
parent
e2a9fb1dc3
commit
2c1c92fef6
10 changed files with 75 additions and 7 deletions
|
|
@ -114,6 +114,19 @@ public class BungeePluginManager extends AbstractPluginManager<Plugin> {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result disablePlugin(Plugin plugin) {
|
||||
PluginDescription desc = plugin.getDescription();
|
||||
String name = desc.getName();
|
||||
try {
|
||||
plugin.onDisable();
|
||||
return Result.SUCCESS;
|
||||
} catch (Throwable th) {
|
||||
proxy.getLogger().log(Level.WARNING, "Exception encountered when disabling plugin: " + name, th);
|
||||
return Result.ERROR;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result reloadPlugin(String pluginName) {
|
||||
Plugin plugin = proxy.getPluginManager().getPlugin(pluginName);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue