Accessing

To integrate your plugin with Cloud, you need to use the CloudRegistry to retrieve a specific API. Here's how to properly hook into the Cloud API in your plugin.

I'm going to show an example of how to access the KitAPI.

There are three ways to access a specific API:

  1. Basic AccessCloudRegistry.cloud(String key) (Simplest method)

  2. Namespace AccessCloudRegistry.namespace(String namespace, String key)

  3. Keyed AccessCloudRegistry.keyed(CloudNamespacedKey.of(String namespace, String key))

Example Usage

Basic Access

KitAPI kits = CloudRegistry.cloud("kits");

Namespace Access

KitAPI kits = CloudRegistry.namespace("cloud", "kits");

Keyed Access

KitAPI kits = CloudRegistry.keyed(CloudNamespacedKey.of("cloud", "kits"));

That's it! Isn't that simple? You have now accessed an API component!

Last updated

Was this helpful?