Merge pull request #2418 from BentoBoxWorld/2417_Add-on_disable_does_not_always_get_run

Add onDisable override method to Pladdon
This commit is contained in:
tastybento 2024-07-02 09:08:27 -07:00 committed by GitHub
commit e7be920376
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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);