mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-12-22 09:08:03 +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 {
|
public abstract class BSAddon {
|
||||||
|
|
||||||
private AddonDescription description;
|
private AddonDescription description;
|
||||||
private boolean enabled;
|
private AddonState state;
|
||||||
|
|
||||||
public abstract void enable();
|
public abstract void enable();
|
||||||
public abstract void disable();
|
public abstract void disable();
|
||||||
@ -13,11 +13,8 @@ public abstract class BSAddon {
|
|||||||
return description;
|
return description;
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isEnabled() {
|
public AddonState getState() { return state; }
|
||||||
return enabled;
|
public boolean isEnabled() { return state == AddonState.ENABLED; }
|
||||||
}
|
public boolean isDisabled() { return state == AddonState.DISABLED; }
|
||||||
|
public boolean isIncompatible() { return state == AddonState.INCOMPATIBLE; }
|
||||||
public void setEnabled(boolean enabled) {
|
|
||||||
this.enabled = enabled;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user