diff --git a/src/main/java/us/tastybento/bskyblock/api/addons/AddonState.java b/src/main/java/us/tastybento/bskyblock/api/addons/AddonState.java new file mode 100644 index 000000000..9883fb501 --- /dev/null +++ b/src/main/java/us/tastybento/bskyblock/api/addons/AddonState.java @@ -0,0 +1,10 @@ +package us.tastybento.bskyblock.api.addons; + +public enum AddonState { + LOADING, + ENABLING, + ENABLED, + DISABLING, + DISABLED, + INCOMPATIBLE +} diff --git a/src/main/java/us/tastybento/bskyblock/api/addons/BSAddon.java b/src/main/java/us/tastybento/bskyblock/api/addons/BSAddon.java index 0cc210043..da74d6bc9 100644 --- a/src/main/java/us/tastybento/bskyblock/api/addons/BSAddon.java +++ b/src/main/java/us/tastybento/bskyblock/api/addons/BSAddon.java @@ -3,7 +3,7 @@ package us.tastybento.bskyblock.api.addons; public abstract class BSAddon { private AddonDescription description; - private boolean enabled; + private AddonState state; public abstract void enable(); public abstract void disable(); @@ -13,11 +13,8 @@ public abstract class BSAddon { return description; } - public boolean isEnabled() { - return enabled; - } - - public void setEnabled(boolean enabled) { - this.enabled = enabled; - } + public AddonState getState() { return state; } + public boolean isEnabled() { return state == AddonState.ENABLED; } + public boolean isDisabled() { return state == AddonState.DISABLED; } + public boolean isIncompatible() { return state == AddonState.INCOMPATIBLE; } }