Skip to main content

CaseManager

CaseManager - is a class that contains all the managers for interacting with dynamic objects in DonateCase.

Available managers

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