Skip to content
Zac edited this page Jan 2, 2025 · 6 revisions

Getting Started with CuTAPI

As a server admin

Firstly, grab a compiled JAR of the plugin from the Releases tab. Secondly, get the JAR file of the plugin that uses CuTAPI and put both JARs in your plugins folder on your Paper server.

That's it! To get custom items, you can use /cutgive <player> <namespaced-item> [quantity] (which requires permission cutapi.admin.give). In future releases, there will be more commands to manipulate items and other features added.

As a developer

Using the library

Create yourself a new PaperMC plugin, preferably using Kotlin (or add this to your existing plugin).

I'd recommend using Gradle Kotlin or Maven. Other build systems work, but you may want to get the details for those from JitPack.

Gradle Kotlin

Add this to your build.gradle.kts file.

repositories {
    maven {
        name = "jitpack"
        url = uri("https://jitpack.io")
    }
}

dependencies {
    // You can also specify a commit hash or a tag to get a specific version.
    implementation("com.github.Mastriel:CuTAPI:-SNAPSHOT")     
}

Maven

Add this to your pom.xml repositories:

<repository>
    <id>jitpack.io</id>
    <url>https://jitpack.io</url>
</repository>

Add this to your pom.xml dependencies:

<dependency>
    <groupId>com.github.Mastriel</groupId>
    <artifactId>CuTAPI</artifactId>
    <version>-SNAPSHOT</version>
</dependency>

Registering your plugin

This must be done before you can interact with CuTAPI.

class MyPlugin : JavaPlugin(), CuTPlugin {
    override fun onEnable() {
        // my_plugin can be anything you'd like; it's the namespace for your plugin.
        CuTAPI.registerPlugin(this, "my_plugin")
    }
}

Clone this wiki locally