CaseManager
CaseManager - is a class that contains all the managers for interacting with dynamic objects in DonateCase.
Available managers
- ActionManager is used to manage executable actions
- AddonManager is used to manage addons
- AnimationManager is used to manage animations
- GUITypedItemManager is used to manage GUITyped items
- MaterialManager is used to manage materials
- SubCommandManager is used to manage subcommands
Getting CaseManager
CaseManager has 2 constructors for initialization: CaseManager#<init>(Addon) and CaseManager#<init>(Plugin)
Internal addon
CaseManager is automatically initialized when the addon is loaded, so retrieval is available by using the method InternalJavaAddon#getCaseAPI()
Example:
public class TestAddon extends InternalJavaAddon {
@Override
public void onEnable() {
CaseManager caseManager = getCaseAPI();
// or you can use the CaseManager#<init>(addon) constructor.
CaseManager caseManager = new CaseManager(this);
}
}
External addon
Example:
public final class TestPlugin extends JavaPlugin {
@Override
public void onEnable() {
// CaseManager#<init>(Plugin) is used in this case
CaseManager caseManager = new CaseManager(this);
}
}