For the complete documentation index, see llms.txt. This page is also available as Markdown.

Developer Guide

Build plugins that integrate with MyPet.

MyPet ships a public API that lets your Bukkit/Paper plugin react to and modify pet behavior. This guide covers how to depend on the API jar, how to listen for the 23 events MyPet publishes, and a handful of copy-paste recipes for the most common integrations.

Migrating from MyPet 3.x? The 4.0 API renamed every event class (MyPet*Event → Pet*Event), changed several method signatures, and removed a few classes outright. See Migrating from v3.x for the full porting guide.

Requirements

  • Java 21

  • Paper (or a Paper fork — Folia is supported). Bukkit and Spigot are not supported in 4.0.

  • Minecraft 1.20.6 or newer

  • MyPet 4.0.0 or newer installed on the server

Add the repository

MyPet publishes its API jar to two Reposilite-hosted Maven repositories:

  • https://repo.userderezzed.dev/snapshots — alpha/beta builds; updates frequently.

  • https://repo.userderezzed.dev/releases — stable cuts.

Pick the URL that matches the MyPet jar installed on your server.

Gradle (Kotlin DSL) is the recommended build tool — it's what MyPet itself uses and gives you type-safe build scripts.

repositories {
    maven("https://repo.userderezzed.dev/snapshots")
    // maven("https://repo.userderezzed.dev/releases")
}
repositories {
    maven { url 'https://repo.userderezzed.dev/snapshots' }
    // maven { url 'https://repo.userderezzed.dev/releases' }
}
<repositories>
    <repository>
        <id>userderezzed-snapshots</id>
        <url>https://repo.userderezzed.dev/snapshots</url>
    </repository>
    <!--
    <repository>
        <id>userderezzed-releases</id>
        <url>https://repo.userderezzed.dev/releases</url>
    </repository>
    -->
</repositories>

Add the dependency

The API jar is provided by the MyPet plugin at runtime, so it must be declared as compileOnly (Gradle) or provided (Maven). Bundling it would create a duplicate MyPetApi on the server classpath.

Declare MyPet as a dependency in plugin.yml

Verify the install

1

Build your plugin

Run your usual build command (./gradlew build, mvn package, etc.) and confirm the jar is produced.

2

Drop both jars into plugins/

Place your plugin jar and MyPet-*.jar in the server's plugins/ directory.

3

Confirm the API is reachable

In your plugin's onEnable(), log a check:

Start the server and look for the line in the console.

Where next

Last updated

Was this helpful?