Skip to content

Add support for Paper 26.1, 26.2 and 26.3 - #291

Open
Jaie55 wants to merge 1 commit into
SkQuery:mainfrom
Jaie55:paper-26-support
Open

Jaie55 wants to merge 1 commit into
SkQuery:mainfrom
Jaie55:paper-26-support

Conversation

@Jaie55

@Jaie55 Jaie55 commented Sep 28, 2026

Copy link
Copy Markdown

Summary

This PR makes SkQuery build and run on the new Minecraft/Paper versioning scheme (26.x) and removes all Spigot-mapped internal reflection, which is no longer usable since Paper 26.1 dropped the internal remapper and ships unobfuscated server jars.

All existing SkQuery syntax stays the same: no script changes are required.

Motivation

  • Minecraft changed its versioning to year.drop (26.1, 26.1.1, 26.2, 26.3, ...) and Minecraft/Paper 26.1+ requires Java 25.
  • Paper 26.1 fully dropped the internal remapper. Plugins that reference Spigot-mapped internals (net.minecraft.server.<version>, org.bukkit.craftbukkit.<version>, PacketPlayOut*, obfuscated methods, etc.) no longer work, even through reflection.
  • Skript 2.15+ is required for 26.x and is Paper-only.

Changes

Build

  • build.gradle
    • Replaced org.spigotmc:spigot-api:1.21.11-R0.2-SNAPSHOT with io.papermc.paper:paper-api:26.1.2.build.74-stable (oldest target of the supported range).
    • Updated Skript from 2.14.3 to 2.16.2.
    • Added the PaperMC repository (https://repo.papermc.io/repository/maven-public/).
    • Removed the unused Spigot snapshots and BungeeCord oss.sonatype.org repositories.
    • Compilation stays on Java 21 bytecode so Paper 1.21.x can still remap/load the jar; building against the 26.x API itself requires JDK 25.
  • gradle.properties
    • Version bumped from 4.3.1 to 4.4.0 (the 4.3.2 release tag never updated this file).
  • .github/workflows/build.yml
    • CI build matrix updated from JDK 21 to JDK 25 (required to read paper-api 26.x class files).
    • Fixed the artifact-upload condition, which checked matrix.java == '17' and therefore never uploaded anything; it now checks '25'.

Plugin metadata

  • src/main/resources/plugin.yml
    • api-version: 1.13 -> api-version: 1.21.4 (the minimum Minecraft version supported by Skript 2.16.2). This also opts the plugin into modern (1.20.5+) material behavior.

Removed Spigot-mapped internals

  • EffShowCredits (display credits to %player%)
    • Removed the PacketPlayOutGameStateChange NMS packet construction and Reflection.sendPacket.
    • Now uses the public Paper API Player#showWinScreen() (available since Paper 1.19.x, verified in the 1.21.4 Javadocs).
  • EffBlockFall (spawn [damaging] [undroppable] falling block ...)
    • Removed the org.bukkit.craftbukkit.<version>.entity.CraftFallingSand reflection and the obfuscated a(boolean) call.
    • Now uses FallingBlock#setHurtEntities(true).
    • Both old code paths only printed a stack trace when they failed, which they did on modern Paper, so these features now actually work instead of silently doing nothing.
  • Reflection
    • Removed the now-unused NMS/OBC helpers: getNMSClass, getOBCClass, getHandle, getField, getMethod, classesEqual, sendPacket and getServerVersion (the latter also relied on the versioned CraftBukkit package that no longer exists).
    • Kept getCaller(), which is still used by Documentation.

Compatibility notes

  • Works on Paper 1.21.4 through 26.3 with Skript 2.16.2.
  • Spigot is no longer a target for these two elements because Player#showWinScreen() is Paper API. This is consistent with Skript 2.15+, which requires Paper.
  • Servers older than 1.21.4 will refuse to load the plugin due to the new api-version.
  • Skript 2.16.2 officially supports Paper up to 26.2; it also loaded without issues on 26.3 in testing.
  • Existing scripts keep working unchanged; the syntax patterns were not modified.

Testing

  • ./gradlew clean build with JDK 25 (Temurin 25.0.4) -> BUILD SUCCESSFUL.
  • Compiled against Paper API 26.1.2.build.74-stable and also verified against 26.3 (alpha) with no compile errors.
  • Booted real Paper servers with Skript 2.16.2 + the built jar and verified the plugin enables cleanly ([SkQuery] Enabling SkQuery v4.4.0, all 152 classes processed, no errors):
    • Paper 1.21.4 build 232 (remap succeeds with Java 21 bytecode)
    • Paper 26.1.2 build 74
    • Paper 26.2 build 129
    • Paper 26.3 build 133
  • Also reviewed a production Paper 26.2 (build 129) log: SkQuery loads and enables without errors, and triggers no legacy-material warnings.

Paper 26.1+ dropped the internal remapper and requires Java 25, so Spigot-mapped internals no longer work.

- Build against paper-api 26.1.2.build.74-stable and Skript 2.16.2
- Bump api-version to 1.21.4
- Use Player#showWinScreen() and FallingBlock#setHurtEntities() instead of NMS/OBC reflection
- Drop unused NMS/OBC reflection helpers, keep Reflection.getCaller()
- Use the PaperMC repository and remove unused Spigot/BungeeCord repos
- Build with JDK 25 in CI (Java 21 bytecode output)
- Bump version to 4.4.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant