Repository navigation
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
year.drop(26.1,26.1.1,26.2,26.3, ...) and Minecraft/Paper 26.1+ requires Java 25.net.minecraft.server.<version>,org.bukkit.craftbukkit.<version>,PacketPlayOut*, obfuscated methods, etc.) no longer work, even through reflection.Changes
Build
build.gradleorg.spigotmc:spigot-api:1.21.11-R0.2-SNAPSHOTwithio.papermc.paper:paper-api:26.1.2.build.74-stable(oldest target of the supported range).2.14.3to2.16.2.https://repo.papermc.io/repository/maven-public/).oss.sonatype.orgrepositories.gradle.properties4.3.1to4.4.0(the 4.3.2 release tag never updated this file)..github/workflows/build.ymlpaper-api26.x class files).matrix.java == '17'and therefore never uploaded anything; it now checks'25'.Plugin metadata
src/main/resources/plugin.ymlapi-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%)PacketPlayOutGameStateChangeNMS packet construction andReflection.sendPacket.Player#showWinScreen()(available since Paper 1.19.x, verified in the 1.21.4 Javadocs).EffBlockFall(spawn [damaging] [undroppable] falling block ...)org.bukkit.craftbukkit.<version>.entity.CraftFallingSandreflection and the obfuscateda(boolean)call.FallingBlock#setHurtEntities(true).ReflectiongetNMSClass,getOBCClass,getHandle,getField,getMethod,classesEqual,sendPacketandgetServerVersion(the latter also relied on the versioned CraftBukkit package that no longer exists).getCaller(), which is still used byDocumentation.Compatibility notes
Player#showWinScreen()is Paper API. This is consistent with Skript 2.15+, which requires Paper.api-version.Testing
./gradlew clean buildwith JDK 25 (Temurin 25.0.4) ->BUILD SUCCESSFUL.26.1.2.build.74-stableand also verified against26.3(alpha) with no compile errors.[SkQuery] Enabling SkQuery v4.4.0, all 152 classes processed, no errors):