Cloud
Discord
  • Welcome!
  • Getting Started
    • Installation
  • Core
    • Features
    • Commands
    • Placeholders
  • Configuration
    • Main
    • Messages
    • Menus
  • api
    • Getting Started
    • Accessing
Powered by GitBook
On this page

Was this helpful?

  1. api

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 Access – CloudRegistry.cloud(String key) (Simplest method)

  2. Namespace Access – CloudRegistry.namespace(String namespace, String key)

  3. Keyed Access – CloudRegistry.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!

PreviousGetting Started

Last updated 2 months ago

Was this helpful?