Skip to content

Update to Minecraft 26.x: Paper 26.3, Java 25, item components - #26

Open
BrainRTP wants to merge 29 commits into
masterfrom
task/update-26.3
Open

BrainRTP wants to merge 29 commits into
masterfrom
task/update-26.3

Conversation

@BrainRTP

@BrainRTP BrainRTP commented Nov 12, 2026 •

Copy link
Copy Markdown
Collaborator

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

  • Minecraft 26.1+ and Java 25 only. Older versions are no longer supported.
  • paper-api:26.3.build.+ replaces paperweight-userdev. The code never used NMS, so the dev bundle was not needed. api-version is 26.1, and the plugin also compiles against paper-api 26.1.2.
  • Gradle 9.0 -> 9.9.1, Shadow 9.6.1, Lombok 1.18.48, FoliaLib 0.5.2 (new com.tcoded coordinates), 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.
  • GitHub Actions bumped to current majors, JDK 25 in all three workflows and in jitpack.yml.
  • MythicLib stays at 1.0.12-SNAPSHOT because the bundled MMOItems-6.5.4.jar needs a class that newer MythicLib removed.
  • Removed: ProGuard setup that nothing used, two dead reflection helpers in util/proxy, the CraftServer reflection in CommandManager, the unused Paper 1.20.6 jar in plugin/libs.

Item properties

  • New: itemModel, tooltipStyle, maxStackSize, rarity.
  • tooltipDisplay from add: tooltipdisplay support #24: the component was written to the ItemStack and then overwritten by the meta flush in SimpleItem, so it was lost whenever a name or lore sat next to it. Fixed, with a test that builds the item the way a menu does. It now merges with components hidden by flags instead of replacing them. The static test hooks are gone from production code.
  • model accepts an integer as before, or an object with floats, flags, strings and colors.
  • glow uses the enchantment glint override instead of a hidden Unbreaking enchantment.
  • flags no longer injects default attribute modifiers by reflection. Paper 26.3 maps HIDE_ATTRIBUTES to the tooltip_display component itself. This also stops flags from clobbering attributeModifiers.
  • data keeps working as a damage alias through Damageable.

Heads and titles

  • skullOwner works for offline players through a name-only profile that Paper resolves asynchronously. No blocking lookup while a menu is built.
  • Inventory titles are created from Components. Legacy & 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.

  • Items handed to players by older versions with glow or flags no longer match clickItem activators, heldItem and inventoryItem rules or itemRemove, because the old extra enchantment and attribute modifiers are gone. They have to be reissued.
  • Placeholders: block_data returns the block state string, item_data returns the damage value. item_localized_name and block_biome keep 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_name returning 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:

  • Draggable menus: a click cancelled by another plugin duplicated the deposited items, and a menu refresh could destroy them. Deposits are now reconciled against the real slot contents after the event is final, and returned synchronously when the plugin unloads.
  • inventoryItems passed when the item failed to build, itemRemove left part of the cost in equipment slots, and takeXp and the xp rule read a stale XP counter.
  • Hot reload left the old activators registered, so an edited menu still opened without its new rules.
  • Variables: SQLite writes could be applied out of order or lost at shutdown, and arithmetic dropped the expiry of temporary variables.
  • Broken or never working features: sound with location, sound with placeholders, customSound with category, shiftClickEntity, plate, refreshItem with an explicit slot in open actions, %var_name% placeholders, entity placeholders on living entities, item_model on items without custom model data, adjacent built-in placeholders, title stay/fadeOut swapped, chance: 0.
  • Attribute modifiers: legacy generic. keys load again, several modifiers per attribute are kept, and their keys are stable across reloads.
  • Folia: chat and join activators, menu closing on reload and the playerScope action now run on the player's region. The playerScope rule still evaluates on the caller's thread, documented as a known limitation.
  • Addons: a shaded HOCON dependency no longer breaks registration, failed dependencies no longer let dependents enable, and rescan respects dependency order.
  • Citizens: the outdated citizens-2.0.jar is replaced by the official citizensapi, since npc_entity_* called a method current Citizens no longer has.

Security and fail-closed loading

  • The js rule 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 to if, and, or and oneof.
  • An unknown action or item property now fails the menu with its location instead of being skipped. Before, a typo such as takeMony: 100 in a shop gave the item for free, and materail: DIAMOND rendered stone. A failed menu is always logged with its file name, also when the error has no config position (for example size: 7, which used to disappear silently).
  • Regressions from earlier commits on this branch: closeActions ran 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-api is pinned to 26.3 build 249, because build 254 breaks MockBukkit 4.120.0 initialization and the dynamic 26.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 build on JDK 25: 323 tests, 0 failed, 0 skipped.
  • Smoke run on Paper 26.3 build 249: the plugin enables, loads the bundled menus and builds the example items with no exceptions.

Not tested: rendering in a graphical client (offline head skins, hidden attribute tooltips, count above 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.

Stanislav Panchenko and others added 29 commits November 12, 2026 14:50
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.

the problem with the flag: HIDE_ATTRIBUTES

1 participant