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:
Frank van der Heijden 2020-09-29 19:09:40 +02:00
parent e2a9fb1dc3
commit 2c1c92fef6
No known key found for this signature in database
GPG key ID: 26DA56488D314D11
10 changed files with 75 additions and 7 deletions

View file

@ -98,7 +98,7 @@ public class BukkitPluginManager extends AbstractPluginManager<Plugin> {
* @param pluginName The plugin to disable.
* @return The result of the disable call.
*/
public static Result disablePlugin(String pluginName) {
public Result disablePlugin(String pluginName) {
return disablePlugin(Bukkit.getPluginManager().getPlugin(pluginName));
}
@ -107,7 +107,8 @@ public class BukkitPluginManager extends AbstractPluginManager<Plugin> {
* @param plugin The plugin to disable.
* @return The result of the disable call.
*/
public static Result disablePlugin(Plugin plugin) {
@Override
public Result disablePlugin(Plugin plugin) {
if (plugin == null) return Result.NOT_ENABLED;
if (!plugin.isEnabled()) return Result.ALREADY_DISABLED;
try {