Feature - plugin watcher, detect file changes & reload

This commit is contained in:
Frank van der Heijden 2020-07-20 20:19:07 +02:00
parent 719163c579
commit 07719cc1cc
No known key found for this signature in database
GPG key ID: 26DA56488D314D11
24 changed files with 387 additions and 15 deletions

View file

@ -4,8 +4,6 @@ import co.aikar.commands.BukkitCommandCompletionContext;
import co.aikar.commands.CommandCompletions;
import co.aikar.commands.PaperCommandManager;
import java.lang.reflect.InvocationTargetException;
import java.util.Collections;
import java.util.Map;
import net.frankheijden.serverutils.bukkit.commands.CommandPlugins;
@ -60,6 +58,7 @@ public class ServerUtils extends JavaPlugin implements CommandExecutor {
reload();
Bukkit.getPluginManager().registerEvents(new BukkitListener(), this);
plugin.enable();
ServerUtilsApp.tryCheckForUpdates();
}
@ -76,6 +75,7 @@ public class ServerUtils extends JavaPlugin implements CommandExecutor {
public void onDisable() {
super.onDisable();
restoreBukkitPluginCommand();
plugin.disable();
}
private void removeCommands(String... commands) {