Add the API dependency
The Cloud API requires Java 21. Add the SimpleCloud and Buf repositories, then add the API withcompileOnly in Gradle or provided in Maven:
Pin the dependency to the version you tested before releasing your plugin.
Require the platform plugin
Declaresimplecloud-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.
- Paper
- Folia
- Spigot
- Velocity
- BungeeCord
Add the dependency to
src/main/resources/paper-plugin.yml:paper-plugin.yml
Create one client
Create aCloudApi 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
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
The API dependency cannot be resolved
The API dependency cannot be resolved
Confirm that your build contains both repositories shown above, then refresh dependencies with
./gradlew --refresh-dependencies or mvn -U package.The plugin fails with NoClassDefFoundError
The plugin fails with NoClassDefFoundError
Check that:
- The matching
simplecloud-apiplatform plugin is installed and enabled. - Your plugin declares it as a required dependency. Paper plugins also need
join-classpath: true. - Your build uses
compileOnlyorprovidedand does not shade the API.
CloudApi.create() fails
CloudApi.create() fails
Confirm that SimpleCloud started the server and that the matching
simplecloud-api platform plugin is enabled.