From ff1438f3a395adac0cabb2bdf47164a459b579a1 Mon Sep 17 00:00:00 2001 From: tastybento Date: Tue, 2 Jul 2024 08:47:09 -0700 Subject: [PATCH] Add onDisable override method to Pladdon --- .../java/world/bentobox/bentobox/api/addons/Pladdon.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main/java/world/bentobox/bentobox/api/addons/Pladdon.java b/src/main/java/world/bentobox/bentobox/api/addons/Pladdon.java index af11005db..0909c51d0 100644 --- a/src/main/java/world/bentobox/bentobox/api/addons/Pladdon.java +++ b/src/main/java/world/bentobox/bentobox/api/addons/Pladdon.java @@ -32,6 +32,14 @@ public abstract class Pladdon extends JavaPlugin { } } + @Override + public void onDisable() { + Addon addon = getAddon(); + if (addon != null) { + addon.onDisable(); + } + } + protected void moveJar() { getLogger().severe(getFile().getName() + " must be in the " + ADDONS_FOLDER + " folder! Trying to move it there..."); File addons = new File(getFile().getParent(), ADDONS_FOLDER);