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.
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.
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
Where next
Last updated
Was this helpful?
