Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
5607e1b
Add NMS module v26_1_R1 for Minecraft 1.26.1
UserDerezzed Mar 25, 2026
c53d857
Update GitHub Actions for Java 25
UserDerezzed Mar 25, 2026
69ebbbc
Gradle changes (see description)
UserDerezzed Mar 27, 2026
501e2bd
Update GitHub Actions workflows
UserDerezzed Apr 23, 2026
c070410
Add UserDerezzed repo and bump knbt
UserDerezzed Apr 23, 2026
9f20556
Fix NBT round-trip for LongArrayTag and mixed text-component lists
UserDerezzed Apr 23, 2026
48a25a9
Update changelog
UserDerezzed Apr 23, 2026
0119afc
Fix active Pets being purged by /petadmin cleanup
UserDerezzed May 3, 2026
fd90b36
Update changelog
UserDerezzed May 3, 2026
1d3e1fb
(26.1+) Fix client crash when capturing AgeableMob-derived pets
UserDerezzed May 7, 2026
2aeaf6c
Update changelog
UserDerezzed May 7, 2026
44b944c
Use Mojang vanilla translations for pet default names
UserDerezzed May 26, 2026
7772d67
Add base 26.2 support
UserDerezzed Jun 17, 2026
d98ef30
Stop relying on downloadVersionmatcher task
UserDerezzed Jun 17, 2026
8d14ec0
Update repo order
UserDerezzed Jun 28, 2026
427afa8
Update changelog
UserDerezzed Jun 28, 2026
dd6c733
Fix server lag on first beacon menu open caused by a blocking Mojang …
UserDerezzed Jun 28, 2026
0d81948
Fix sound error during MyPetLevelUpEvent on older servers
UserDerezzed Jun 28, 2026
00ef8c0
Fix crash when right clicking a Pet on 26.2
UserDerezzed Jun 28, 2026
6267b8e
Update changelog for release [ci skip]
UserDerezzed Jun 29, 2026
e5cf3b2
Bump version number
UserDerezzed Jun 30, 2026
f8f1f27
Fix Pet item-save crash when an NBT list tag isn't ArrayList-backed
UserDerezzed Jun 30, 2026
7de8a96
Fix duplicate-key crash re-registering entities after server reload
UserDerezzed Jun 30, 2026
8d6037d
Disable cleanly when no compat module loads instead of NPEing in onEn…
UserDerezzed Jun 30, 2026
0890f54
Fix NPE when a player's MyPetPlayer is referenced mid-load
UserDerezzed Jun 30, 2026
3d1ff09
Disable gracefully when entity registration fails on hybrid servers
UserDerezzed Jun 30, 2026
7f375c9
Suppress vanilla death loot for pets (fix "Components not bound yet")
UserDerezzed Jun 30, 2026
7e58e22
Resolve pet attributes dynamically instead of a hardcoded mob list (f…
UserDerezzed Jun 30, 2026
874ba0a
Guard empty ItemStack in NBT conversion on 1.20.5-1.21.4 modules
UserDerezzed Jun 30, 2026
5f3cec3
Guard Creaking.getHome() against builds where the method is missing
UserDerezzed Jun 30, 2026
97a9e35
Catch LinkageError when loading compat classes
UserDerezzed Jun 30, 2026
21621dc
Guard null field in v1_20_R1 CraftMyPet disguise
UserDerezzed Jun 30, 2026
d338927
Fail safe in WorldGuard hook when WG is reloaded/unloaded
UserDerezzed Jun 30, 2026
db4d63d
Swallow duplicate scheduling in RepositoryCallback
UserDerezzed Jun 30, 2026
12bff2f
Fix mount/unmount StackOverflow when dismount location is unsafe
UserDerezzed Jun 30, 2026
273924d
Attribute event-listener errors to the plugin that actually threw
UserDerezzed Jun 30, 2026
0f0e675
Fix MyPet not sending source context to Sentry
UserDerezzed Jun 30, 2026
a9b772a
Guard null resource in copyResource to prevent onEnable crash
UserDerezzed Jun 30, 2026
94eb6f6
Don't send local build errors to Sentry
UserDerezzed Jun 30, 2026
3a57876
Respect MMOItems/MythicLib defense in Pet attacks
UserDerezzed Jun 30, 2026
6f42f06
Fix MobStacker hook looking up the wrong plugin name
UserDerezzed Jun 30, 2026
6ecfee9
Fix NPE when equipped Pets sync to viewers on 1.21+
UserDerezzed Jun 30, 2026
9c7a9a9
Catch LinkageError when the SQLite driver fails to load
UserDerezzed Jun 30, 2026
90e5a65
Fix ranged attacks dealing no damage to dueling Pets
UserDerezzed Jun 30, 2026
d7ac7bd
Upgrade bStats to 3.1.0
UserDerezzed Jun 30, 2026
ca09cc2
Fix NPE when a Pet's food list has an invalid entry
UserDerezzed Jun 30, 2026
a77e242
Fix NPE on world change when player leaves mid-event
UserDerezzed Jun 30, 2026
7012e42
Release MySQL init connection before running migrations
UserDerezzed Jun 30, 2026
48e5526
Guard legacy EnderDragon rotation fix against temporary players
UserDerezzed Jun 30, 2026
b724ffc
Stop sending DB connection errors
UserDerezzed Jun 30, 2026
34a599c
Fix Phantom Pets crawling to near-standstill when attacking
UserDerezzed Jul 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 12 additions & 0 deletions .github/changelogs/3.14.2-SNAPSHOT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
- (b6) (snapshot fix) Fixed crash when right clicking a Pet on 26.2
- (b6) Fixed sound error during MyPetLevelUpEvent on older servers
- (b6) Fixed server lag on first beacon menu open caused by a blocking Mojang skin lookup
- (b5) Add support for Spigot/Paper 26.2
- (b5) Use Mojang's vanilla translation keys for pet names
- (b4) (26.1+) Fix client-side crash when capturing AgeableMob-derived pets (Wolf, Cat, Cow, Pig, etc.)
- (b3) Add support for Spigot/Paper 26.1.1 and 26.1.2
- (b3) Fix active Pets being purged by /petadmin cleanup
- (b2) Attempt to fix custom items from plugins like ItemsAdder being lost in Pet inventories
- (b1) Add basic support for Spigot/Paper 26.1 (Golden Dandelions not yet supported)
- (b1) Remove RawMessage dependency in favor of Spigot's BaseComponent API
- (b1) Add API publishing for developers at https://repo.userderezzed.dev/
34 changes: 34 additions & 0 deletions .github/changelogs/3.14.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
MyPet 3.14.2 is here, bringing support for the latest Minecraft releases along with a handful of important fixes.

Currently, MyPet is primarily developed by one person - me! All of these updates are produced for free in my spare time. If you or your players appreciate MyPet, please consider buying me a coffee or lunch (it means a lot): https://ko-fi.com/UserDerezzed

If you want to chat about MyPet, get help, or alpha test MyPet 4, join our Discord: https://discord.gg/GtcdWFw

**MyPet 3.14.2 supports the following Minecraft versions**: 1.8.8, 1.12.2, 1.16.5, 1.17.1, 1.18.2, 1.19.2, 1.19.3, 1.19.4, 1.20, 1.20.1, 1.20.2, 1.20.3, 1.20.4, 1.20.5, 1.20.6, 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11, 26.1, 26.1.1, 26.1.2, 26.2

The MyPet 3.14 series will be the **last MyPet version series to support Minecraft versions below 1.20.6. Additional bugfixes may be released for 3.14 prior to MyPet 4.0's release.

Additionally, the MyPet 3.14 series will be the **last MyPet version series to support base Spigot server software**. Paper is the superior and most widely used server software, with over 82% of Minecraft Java servers today running Paper or offshoots of Paper. Making the switch is as easy as swapping your server jar. Switch to Paper today: https://papermc.io

## New Minecraft Versions Support
MyPet now supports Spigot/Paper 26.1, 26.1.1, 26.1.2, and 26.2. Please note that Golden Dandelion mechanics are not yet supported on these versions, and MyPet 3 does not support

## Pet Name Improvements
Default Pet names now use Mojang's vanilla translation keys. This means Pet names automatically match the player's client language and stay consistent with vanilla Minecraft naming.

## Developer Changes
- API publishing is now available for developers at https://repo.userderezzed.dev/
- The legacy RawMessage dependency has been removed in favor of Spigot's BaseComponent API

## Bugfixes
A sound error during the MyPetLevelUpEvent on older servers has been fixed, along with server lag on the first beacon menu open that was caused by a blocking Mojang skin lookup. Active Pets are no longer purged by `/petadmin cleanup`, and an attempt has been made to fix custom items from plugins like ItemsAdder being lost in Pet inventories.

### Full changelog:
- Added support for Spigot/Paper 26.1, 26.1.1, 26.1.2, and 26.2 (Golden Dandelions not yet supported)
- Switched default Pet names to use Mojang's vanilla translation keys
- Added API publishing for developers at https://repo.userderezzed.dev/
- Removed RawMessage dependency in favor of Spigot's BaseComponent API
- Fix sound error during MyPetLevelUpEvent on older servers
- Fix server lag on first beacon menu open caused by a blocking Mojang skin lookup
- Fix active Pets being purged by `/petadmin cleanup`
- Attempt to fix custom items from plugins like ItemsAdder being lost in Pet inventories
27 changes: 27 additions & 0 deletions .github/changelogs/3.14.3-SNAPSHOT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
- (b2) Updated bStats to 3.1.0
- (b2) Disabled bStats reporting for local builds
- (b2) Fixed Phantom Pets slowing down to a near-standstill when they target a mob
- (b2) Fixed an error that could occur on older server versions while a player was still connecting to the server
- (b2) Fixed MyPet logging a false "connection leak detected" warning during startup or reload on MySQL setups with large databases or slow connections
- (b2) Fixed an error that could occur when a player changed worlds (e.g. through a portal teleport) while their Pet was unavailable or they were disconnecting
- (b2) Fixed error when a Pet's food list in pet-config.yml contained an invalid or "none" entry
- (b2) Fixed Pet ranged attacks not dealing damage to the opposing Pet during a duel
- (b2) Fixed MyPet crashing on startup when the server's SQLite database driver failed to load (e.g. the driver doesn't exist)
- (b2) Fixed an error when a Pet wearing or holding equipment came into view of a player on 1.21 and newer
- (b2) Fixed MyPet failing to hook into MobStacker (kiwifisher)
- (b2) Fixed Pet melee and ranged attacks ignoring damage reductions applied by other plugins (such as custom armor/defense systems)
- (b2) Fixed an error when a bundled file (skilltrees, pet-shops.yml, etc.) was missing from the MyPet jar
- (b1) MyPet now disables with a clear message on unsupported Minecraft versions
- (b1) MyPet now disables with a clear message on unsupported Forge-Bukkit hybrid servers (Arclight, Mohist) instead of crashing during startup
- (b1) Fixed a bug that sometimes caused NBT data loss when items had data from third party plugins
- (b1) Fixed MyPet failing to re-register its entities after a server reload on 1.20.3+
- (b1) Fixed occasional errors when a player teleported, disconnected, or was attacked while their Pet data was still loading
- (b1) Fixed an error that could occur when a Pet died on 26.1+
- (b1) Fixed certain Pet types erroring when they spawned, ticked, or were summoned on 1.21+
- (b1) Fixed an error when a Pet with an empty equipment slot was converted/stored on some 1.20.5-1.21.4 servers
- (b1) Fixed an error with Creaking Pets on some 1.21.4 servers that lacked the getHome API
- (b1) Fixed a startup error (NoClassDefFoundError) on servers whose internals do not match the detected version
- (b1) Fixed an error that could occur when summoning a Pet (e.g. /petcall) on some 1.20 servers
- (b1) Fixed an error when WorldGuard is reloaded/unloaded at runtime
- (b1) Fixed a recurring internal "Already scheduled" error in the database/repository system
- (b1) Fixed a server crash that could occur when a player mounted a Pet where it could not safely dismount on 1.21.6+
29 changes: 24 additions & 5 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@ jobs:
timeout-minutes: 30

env:
JAVA_VERSION: '21'
JAVA_VERSION: '25'
PROJECT_VERSION: ""
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}
GH_TOKEN: ${{ secrets.TOKEN_GITHUB }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
HANGAR_TOKEN: ${{ secrets.HANGAR_TOKEN }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
POLYMART_TOKEN: ${{ secrets.POLYMART_TOKEN }}

steps:
- name: Checkout
Expand Down Expand Up @@ -52,6 +51,28 @@ jobs:
- name: Build MyPet
run: |
./gradlew --no-daemon build -PbuildType=release -PSENTRY_AUTH_TOKEN=${SENTRY_AUTH_TOKEN}
env:
REPOSILITE_TOKEN: ${{ secrets.REPOSILITE_TOKEN }}

# Source context (Java "source maps") is uploaded by the Sentry Gradle plugin during the
# build above. This step creates and finalizes the matching release.
- name: Finalize Sentry release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: mypet
SENTRY_PROJECT: mypet
with:
version: ${{ env.PROJECT_VERSION }}
environment: production
finalize: true
set_commits: auto
ignore_missing: true

- name: Publish API release to Reposilite
run: ./gradlew --no-daemon :api:publish -PbuildType=release
env:
REPOSILITE_TOKEN: ${{ secrets.REPOSILITE_TOKEN }}

- name: Find shaded JAR
id: findjar
Expand Down Expand Up @@ -146,6 +167,7 @@ jobs:
1.19.x
1.20.x
1.21.x
26.1
files: ${{ steps.findjar.outputs.jar }}

- name: Publish to Hangar
Expand All @@ -156,9 +178,6 @@ jobs:
-PHANGAR_FILE=${{ steps.findjar.outputs.jar }} \
-PHANGAR_CHANGELOG="${{ steps.changelog.outputs.content }}"

- name: Publish to Polymart
run: ./gradlew createPolymartRelease --no-daemon -PPOLYMART_TOKEN=${POLYMART_TOKEN} -PPOLYMART_VERSION=${PROJECT_VERSION} -PPOLYMART_FILE=${{ steps.findjar.outputs.jar }}

- name: Send a Discord webhook notification
env:
FULL_CHANGELOG: ${{ steps.changelog.outputs.content }}
Expand Down
37 changes: 24 additions & 13 deletions .github/workflows/build-snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,14 @@ jobs:
timeout-minutes: 30

env:
JAVA_VERSION: '21'
JAVA_VERSION: '25'
PROJECT_VERSION: ""
BUILD_NUMBER: 0
WEBHOOK_URL: ${{ secrets.WEBHOOK_URL }}
GH_TOKEN: ${{ secrets.TOKEN_GITHUB }}
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
HANGAR_TOKEN: ${{ secrets.HANGAR_TOKEN }}
MODRINTH_TOKEN: ${{ secrets.MODRINTH_TOKEN }}
POLYMART_TOKEN: ${{ secrets.POLYMART_TOKEN }}

steps:
- name: Checkout
Expand Down Expand Up @@ -126,6 +125,28 @@ jobs:
- name: Build MyPet
run: |
./gradlew --no-daemon build -PbuildType=dev -PBUILD_NUMBER=${BUILD_NUMBER} -PSENTRY_AUTH_TOKEN=${SENTRY_AUTH_TOKEN}
env:
REPOSILITE_TOKEN: ${{ secrets.REPOSILITE_TOKEN }}

# Source context (Java "source maps") is uploaded by the Sentry Gradle plugin during the
# build above. This step creates and finalizes the matching release.
- name: Finalize Sentry release
uses: getsentry/action-release@v1
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: mypet
SENTRY_PROJECT: mypet
with:
version: ${{ env.PROJECT_VERSION }}-SNAPSHOT-b${{ env.BUILD_NUMBER }}
environment: development
finalize: true
set_commits: auto
ignore_missing: true

- name: Publish API snapshot to Reposilite
run: ./gradlew --no-daemon :api:publish -PbuildType=dev
env:
REPOSILITE_TOKEN: ${{ secrets.REPOSILITE_TOKEN }}

- name: Find and rename shaded JAR with build number
id: findjar
Expand Down Expand Up @@ -227,19 +248,9 @@ jobs:
1.19.x
1.20.x
1.21.x
26.1
files: ${{ steps.findjar.outputs.jar }}

# - name: Publish to Hangar
# run: |
# ./gradlew publishPluginPublicationToHangar --no-daemon \
# -PbuildType=dev \
# -PHANGAR_VERSION=${PROJECT_VERSION}-SNAPSHOT-b${BUILD_NUMBER} \
# -PHANGAR_FILE=${{ steps.findjar.outputs.jar }} \
# -PHANGAR_CHANGELOG="${{ steps.changelog.outputs.content }}"

- name: Publish to Polymart
run: ./gradlew createPolymartRelease --no-daemon -PPOLYMART_TOKEN=${POLYMART_TOKEN} -PPOLYMART_VERSION=${PROJECT_VERSION}-SNAPSHOT-b${BUILD_NUMBER} -PPOLYMART_FILE=${{ steps.findjar.outputs.jar }}

- name: Send a Discord webhook notification
env:
CHANGELOG: ${{ steps.changelog.outputs.content }}
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/gradle-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
timeout-minutes: 30

env:
JAVA_VERSION: '21'
JAVA_VERSION: '25'
BUILD_NUMBER: 1

steps:
Expand All @@ -42,4 +42,6 @@ jobs:
./gradlew --no-daemon \
-PBUILD_NUMBER="${BUILD_NUMBER}" \
-PGIT_COMMIT="${{ github.sha }}" \
clean build
clean build
env:
REPOSILITE_TOKEN: ${{ secrets.REPOSILITE_TOKEN }}
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
# Ant
build.number

src/main/resources/versionmatcher.csv

# Gradle
.gradle/
.gradle
Expand Down
45 changes: 35 additions & 10 deletions api/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,26 +1,51 @@
plugins {
`java-library`
id("io.freefair.lombok")
}

repositories {
mavenCentral()

maven("https://hub.spigotmc.org/nexus/content/groups/public/")
maven("https://repo.md-5.net/content/repositories/public/")
`maven-publish`
}

dependencies {
compileOnly("org.spigotmc:spigot-api:1.16.5-R0.1-SNAPSHOT")

compileOnly("org.fusesource.jansi:jansi:1.18")
compileOnly("com.google.code.gson:gson:2.8.9")
compileOnly("de.keyle:knbt:0.0.5")
compileOnly("at.blvckbytes:RawMessage:0.2")
compileOnly("de.keyle:knbt:0.0.6")
compileOnly("org.jetbrains:annotations:16.0.2")
}

tasks.withType<JavaCompile>().configureEach {
options.release.set(8)
options.encoding = "UTF-8"
}

val buildType = rootProject.findProperty("buildType")?.toString() ?: "local"
val versionSuffix = when (buildType) {
"release" -> ""
"snapshot", "dev" -> "-SNAPSHOT"
else -> "-SNAPSHOT-local"
}
val apiVersion = "${rootProject.version}$versionSuffix"

publishing {
repositories {
maven {
name = "UserDerezzed"
val repoPath = if (apiVersion.endsWith("-SNAPSHOT") || apiVersion.endsWith("-SNAPSHOT-local")) "snapshots" else "releases"
url = uri("https://repo.userderezzed.dev/$repoPath")
credentials {
username = "MyPetORG"
password = providers.gradleProperty("reposiliteToken").orNull
?: System.getenv("REPOSILITE_TOKEN")
}
}
}

publications {
create<MavenPublication>("mavenJava") {
from(components["java"])

groupId = "de.keyle"
artifactId = "mypet-api"
version = apiVersion
}
}
}
19 changes: 11 additions & 8 deletions api/src/main/java/de/Keyle/MyPet/api/PlatformHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -107,18 +107,21 @@ public void sendMessage(Player player, String Message) {
}

public boolean copyResource(Plugin plugin, String ressource, File destination) {
try {
InputStream template = plugin.getResource(ressource);
OutputStream out = Files.newOutputStream(destination.toPath());

InputStream template = plugin.getResource(ressource);
if (template == null) {
// getResource() returns null (rather than throwing) when the entry is missing from the
// jar - e.g. a corrupted download, a host that repackages/strips the jar, or an
// incomplete build. Fail gracefully instead of NPEing out of onEnable and disabling MyPet.
plugin.getLogger().warning("Could not copy bundled resource \"" + ressource + "\": it is missing from the MyPet jar.");
return false;
}
try (InputStream in = template;
OutputStream out = Files.newOutputStream(destination.toPath())) {
byte[] buf = new byte[1024];
int len;
while ((len = template.read(buf)) > 0) {
while ((len = in.read(buf)) > 0) {
out.write(buf, 0, len);
}
template.close();
out.close();

return true;
} catch (IOException e) {
e.printStackTrace();
Expand Down
Loading
Loading