From 9d487eafabf6e5370e84f23ad4f9b4a039252629 Mon Sep 17 00:00:00 2001 From: unldenis Date: Fri, 30 Jan 2026 03:55:25 +0100 Subject: [PATCH 1/2] add support 1.21.11 --- .github/workflows/deploy.yml | 3 -- pom.xml | 40 +++++++++---------- .../github/unldenis/corpse/CorpsePlugin.java | 20 +++++----- src/main/resources/plugin.yml | 7 ++++ 4 files changed, 38 insertions(+), 32 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 70f1c61..58a4c8a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -4,9 +4,6 @@ on: push: branches: - '**' - pull_request: - branches: - - '**' jobs: build-and-deploy: diff --git a/pom.xml b/pom.xml index 57ee1b4..a159716 100644 --- a/pom.xml +++ b/pom.xml @@ -13,7 +13,6 @@ 8 - @@ -53,8 +52,8 @@ com.github.retrooper packetevents-spigot - 2.10.1 - + 2.11.2 + @@ -69,12 +68,11 @@ - + org.apache.maven.plugins maven-shade-plugin - 3.5.2 - + 3.6.1 package @@ -82,29 +80,31 @@ shade + false - false - - io.github.retrooper.packetevents - com.github.unldenis.corpse.external.packetevents + com.github.retrooper + com.github.unldenis.corpse.libs.packetevents + + + io.github.retrooper + com.github.unldenis.corpse.libs.packetevents + + net.kyori + com.github.unldenis.corpse.libs.kyori + + - - - - com.github.retrooper:packetevents-spigot - - - - - - + diff --git a/src/main/java/com/github/unldenis/corpse/CorpsePlugin.java b/src/main/java/com/github/unldenis/corpse/CorpsePlugin.java index ac70cbc..e155094 100644 --- a/src/main/java/com/github/unldenis/corpse/CorpsePlugin.java +++ b/src/main/java/com/github/unldenis/corpse/CorpsePlugin.java @@ -113,17 +113,19 @@ public void onEnable() { @Override public void onDisable() { - BukkitTask task = pool.getTickTask(); - if (task != null) { - task.cancel(); + if(pool != null) { + BukkitTask task = pool.getTickTask(); + if (task != null) { + task.cancel(); + } + for (Corpse c : pool.getCorpses()) { + c.getSeeingPlayers() + .forEach(c::hide); + } } - for (Corpse c : pool.getCorpses()) { - c.getSeeingPlayers() - .forEach(c::hide); + if(PacketEvents.getAPI() != null) { + PacketEvents.getAPI().terminate(); } - - //Terminate the instance (clean up process) - PacketEvents.getAPI().terminate(); } @NotNull diff --git a/src/main/resources/plugin.yml b/src/main/resources/plugin.yml index 306caf9..6fa1a4c 100644 --- a/src/main/resources/plugin.yml +++ b/src/main/resources/plugin.yml @@ -3,6 +3,13 @@ version: ${project.version} api-version: "1.13" author: unldenis main: com.github.unldenis.corpse.CorpsePlugin +softdepend: + - ProtocolLib + - ProtocolSupport + - ViaVersion + - ViaBackwards + - ViaRewind + - Geyser-Spigot commands: spawncorpse: removecorpse: \ No newline at end of file From 99a62753c28e9efd134cbdb2c2d046a83cc6f734 Mon Sep 17 00:00:00 2001 From: unldenis Date: Fri, 30 Jan 2026 04:47:04 +0100 Subject: [PATCH 2/2] upload corpse plugin jar in the workflow --- .github/workflows/deploy.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 58a4c8a..ceb7b56 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -22,6 +22,12 @@ jobs: - name: Build plugin with Maven run: mvn clean package + - name: Upload Corpse plugin JAR + uses: actions/upload-artifact@v4 + with: + name: Corpse-plugin + path: target/Corpse-*.jar + - name: Deploy shaded plugin to VPS run: | # Find the shaded JAR (exclude original-*.jar)