Class CoreProtectIntegration

java.lang.Object
com.ranull.graves.integration.CoreProtectIntegration

public class CoreProtectIntegration extends Object
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 Details

    • plugin

      private final Graves plugin
    • coreProtectAPI

      private net.coreprotect.CoreProtectAPI coreProtectAPI
  • Constructor Details

    • CoreProtectIntegration

      public CoreProtectIntegration(Graves plugin)
      Constructs a new CoreProtectIntegration.
      Parameters:
      plugin - the Graves 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 return null.
      Returns:
      the CoreProtectAPI instance, or null if CoreProtect is unavailable or incompatible