Skip to main content

Add the API dependency

The Cloud API requires Java 21. Add the SimpleCloud and Buf repositories, then add the API with compileOnly in Gradle or provided in Maven:
Do not shade the Cloud API into your plugin. The simplecloud-api platform plugin provides it at runtime, and bundling another copy can cause class-loading conflicts.
Pin the dependency to the version you tested before releasing your plugin.

Require the platform plugin

Declare simplecloud-api as a required dependency so it loads before your plugin. SimpleCloud’s default templates already include the matching platform plugin. If you use custom templates, keep it in the plugins directory.
Add the dependency to src/main/resources/paper-plugin.yml:
paper-plugin.yml

Create one client

Create a CloudApi instance when your plugin starts, reuse it for every request, and close it when your plugin stops. SimpleCloud provides the connection settings automatically.
MyPlugin.java
Most API calls return CompletableFuture; compose them instead of blocking, and use your platform’s scheduler before changing platform state from a callback.

Velocity lifecycle

On Velocity, create and close the same client from the proxy lifecycle events:
MyPlugin.java
CloudApi.create() uses the connection settings supplied by SimpleCloud. If your plugin needs different request timeouts or cache behavior, pass a custom CloudApiOptions instance.

Troubleshooting

Confirm that your build contains both repositories shown above, then refresh dependencies with ./gradlew --refresh-dependencies or mvn -U package.
Check that:
  • The matching simplecloud-api platform plugin is installed and enabled.
  • Your plugin declares it as a required dependency. Paper plugins also need join-classpath: true.
  • Your build uses compileOnly or provided and does not shade the API.
Confirm that SimpleCloud started the server and that the matching simplecloud-api platform plugin is enabled.