mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-12-22 00:58:04 +01:00
Addons API - Added AddonState
This commit is contained in:
parent
0d2eb51f5d
commit
3196b0b962
@ -0,0 +1,10 @@
|
||||
package us.tastybento.bskyblock.api.addons;
|
||||
|
||||
public enum AddonState {
|
||||
LOADING,
|
||||
ENABLING,
|
||||
ENABLED,
|
||||
DISABLING,
|
||||
DISABLED,
|
||||
INCOMPATIBLE
|
||||
}
|
@ -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; }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user