From 1a281ddb45a6ba27bb0e04bedf2209feac079efc Mon Sep 17 00:00:00 2001 From: Intybyte Date: Wed, 4 Dec 2024 19:18:56 +0100 Subject: [PATCH] Only call onDisable on active hooks --- .../src/main/java/at/pavlov/internal/HookManager.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/api-internal/src/main/java/at/pavlov/internal/HookManager.java b/api-internal/src/main/java/at/pavlov/internal/HookManager.java index 810ee1ff..7bf3d08b 100644 --- a/api-internal/src/main/java/at/pavlov/internal/HookManager.java +++ b/api-internal/src/main/java/at/pavlov/internal/HookManager.java @@ -60,7 +60,9 @@ public void registerHook(Hook hook) { public void disableHooks() { for (Hook hook : hooks.values()) { - hook.onDisable(); + if (hook.active()) { + hook.onDisable(); + } } } }