forked from Limework/RediSkript
use HIGHEST priority on disable, so "on script unload" can still work
This commit is contained in:
@@ -3,6 +3,8 @@ import net.limework.core.commands.ReloadRedis;
|
||||
import net.limework.core.hooks.SkriptHook;
|
||||
import net.limework.core.managers.RedisManager;
|
||||
import org.bukkit.command.PluginCommand;
|
||||
import org.bukkit.event.EventHandler;
|
||||
import org.bukkit.event.EventPriority;
|
||||
import org.bukkit.plugin.java.JavaPlugin;
|
||||
|
||||
public class RediSkript extends JavaPlugin {
|
||||
@@ -32,6 +34,8 @@ public class RediSkript extends JavaPlugin {
|
||||
}
|
||||
|
||||
@Override
|
||||
//using HIGHEST event priority so it shuts down last and code can still execute well in "on script unload" and "on skript unload" events
|
||||
@EventHandler(priority = EventPriority.HIGHEST)
|
||||
public void onDisable() {
|
||||
if (rm != null) {
|
||||
rm.shutdown();
|
||||
|
||||
Reference in New Issue
Block a user