Package com.ranull.graves.integration
Class CoreProtectIntegration
java.lang.Object
com.ranull.graves.integration.CoreProtectIntegration
Handles integration with the CoreProtect plugin.
This class provides methods to obtain and interact with the CoreProtect API.
It checks the CoreProtect plugin's availability and API version to ensure compatibility.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCoreProtectIntegration
(Graves plugin) Constructs a newCoreProtectIntegration
. -
Method Summary
Modifier and TypeMethodDescriptionnet.coreprotect.CoreProtectAPI
Retrieves the CoreProtect API instance.
-
Field Details
-
plugin
-
coreProtectAPI
private net.coreprotect.CoreProtectAPI coreProtectAPI
-
-
Constructor Details
-
CoreProtectIntegration
Constructs a newCoreProtectIntegration
.- Parameters:
plugin
- theGraves
plugin instance
-
-
Method Details
-
getCoreProtectAPI
public net.coreprotect.CoreProtectAPI getCoreProtectAPI()Retrieves the CoreProtect API instance. If the API instance is not already cached, it attempts to obtain it by checking if the CoreProtect plugin is available, enabled, and if the API version is at least 9. If the CoreProtect plugin is not available or the API version is insufficient, this method will log an error and returnnull
.- Returns:
- the
CoreProtectAPI
instance, ornull
if CoreProtect is unavailable or incompatible
-