Repository navigation
Conversation
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.
Moves the plugin to Minecraft 26.x (Paper 26.3 API, Java 25), adds item data component properties, fixes offline player heads and passes inventory titles as Adventure components. Builds on #24, which is already merged, and fixes a bug in it.
Platform and build
paper-api:26.3.build.+replaces paperweight-userdev. The code never used NMS, so the dev bundle was not needed.api-versionis26.1, and the plugin also compiles against paper-api 26.1.2.com.tcodedcoordinates), NBT API 2.16.1, WorldGuard 7.0.21, PlaceholderAPI 2.12.3, SkinsRestorer API 15.12.6, JUnit 6.1.3, MockBukkit v26.3 4.120.0, Mockito 5.24.0, Adventure MiniMessage 5.2.0 to match Paper.jitpack.yml.util/proxy, the CraftServer reflection inCommandManager, the unused Paper 1.20.6 jar inplugin/libs.Item properties
itemModel,tooltipStyle,maxStackSize,rarity.tooltipDisplayfrom add: tooltipdisplay support #24: the component was written to the ItemStack and then overwritten by the meta flush inSimpleItem, so it was lost whenever anameorloresat next to it. Fixed, with a test that builds the item the way a menu does. It now merges with components hidden byflagsinstead of replacing them. The static test hooks are gone from production code.modelaccepts an integer as before, or an object withfloats,flags,stringsandcolors.glowuses the enchantment glint override instead of a hidden Unbreaking enchantment.flagsno longer injects default attribute modifiers by reflection. Paper 26.3 mapsHIDE_ATTRIBUTESto thetooltip_displaycomponent itself. This also stopsflagsfrom clobberingattributeModifiers.datakeeps working as a damage alias throughDamageable.Heads and titles
skullOwnerworks for offline players through a name-only profile that Paper resolves asynchronously. No blocking lookup while a menu is built.&and section codes, hex codes and MiniMessage keep working.Behaviour changes for server admins
These are also in the new "Upgrading" section of the README.
gloworflagsno longer matchclickItemactivators,heldItemandinventoryItemrules oritemRemove, because the old extra enchantment and attribute modifiers are gone. They have to be reissued.block_datareturns the block state string,item_datareturns the damage value.item_localized_nameandblock_biomekeep their old output.Audit fixes
After the upgrade, the whole plugin was audited area by area against the Paper 26.3 implementation. 44 defects were confirmed and fixed, each with a regression test where one could be written. Three came from this branch (
item_localized_namereturning an empty string, a tooltip style example with missing textures, placeholder text in titles being colour-translated twice); the rest predate it. The notable ones:inventoryItemspassed when the item failed to build,itemRemoveleft part of the cost in equipment slots, andtakeXpand thexprule read a stale XP counter.soundwithlocation,soundwith placeholders,customSoundwithcategory,shiftClickEntity,plate,refreshItemwith an explicit slot in open actions,%var_name%placeholders, entity placeholders on living entities,item_modelon items without custom model data, adjacent built-in placeholders, titlestay/fadeOutswapped,chance: 0.generic.keys load again, several modifiers per attribute are kept, and their keys are stable across reloads.playerScopeaction now run on the player's region. TheplayerScoperule still evaluates on the caller's thread, documented as a known limitation.citizens-2.0.jaris replaced by the officialcitizensapi, sincenpc_entity_*called a method current Citizens no longer has.Security and fail-closed loading
jsrule is removed. It substituted placeholder values into JavaScript source, so text a player typed into a chat input could become code if any plugin shipped Nashorn; without Nashorn it threw on every check. Menus that use it now fail to load with the location and a pointer toif,and,orandoneof.takeMony: 100in a shop gave the item for free, andmaterail: DIAMONDrendered stone. A failed menu is always logged with its file name, also when the error has no config position (for examplesize: 7, which used to disappear silently).closeActionsran again when navigating from one menu to another, and two clicks in one tick could spend a deposited stack that was already taken back. Both are fixed with tests.paper-apiis pinned to 26.3 build 249, because build 254 breaks MockBukkit 4.120.0 initialization and the dynamic26.3.build.+would have broken CI on its own.Issues
Fixes #2. #1, #14 and #8 were already fixed by the 2.0.0 rewrite and can be closed once this is released.
Testing
./gradlew buildon JDK 25: 323 tests, 0 failed, 0 skipped.Not tested: rendering in a graphical client (offline head skins, hidden attribute tooltips,
countabove the stack size on unstackable items), the optional integrations (Vault, LuckPerms, WorldGuard, MMOItems, SkinsRestorer and others), Folia, and the JitPack build. CI on this PR is the first run of the workflows on Java 25.