Skip to content

♻️ Replace the local zMenu JAR with its published API - #256

Open
NoltoxGit wants to merge 2 commits into
Maxlego08:developfrom
NoltoxGit:refactor/zmenu-api-only
Open

NoltoxGit wants to merge 2 commits into
Maxlego08:developfrom
NoltoxGit:refactor/zmenu-api-only

Conversation

@NoltoxGit

Copy link
Copy Markdown
Contributor

Changes

zEssentials still compiled against a checked-in zMenu implementation JAR for item persistence and sound creation. Upgrade zmenu-api to 1.1.2.1 and use the published API for these remaining integrations, removing the binary from the repository and simplifying dependency maintenance.

  • Remove libs/zMenu-1.1.2.0.jar, its Gradle file dependencies and the local-library JAR ignore exception.
  • Use InventoryManager#serializeItemStack and deserializeItemStack for mailbox items, vault contents and icons, and item holograms. Existing constructors and the stored item format are preserved.
  • Use InventoryManager#createSoundOption for teleportation and chat ping sounds. Preserve resource-pack sounds with a small SoundOption implementation that plays their string keys through Paper: the zMenu factory currently returns null for names it cannot resolve.
  • Update the changelog to document the API migration and zMenu 1.1.2.1+ runtime requirement.

Validation

  • Clean compilation and shaded builds of the plugin, API and Discord bot passed, including all supported NMS modules.
  • Every zMenu import resolves from the published API artifact; the built plugin and API JARs contain no bundled zMenu classes.
  • 34 checks passed on each of Paper 1.21.4 / Java 21 and Paper 26.3 / Java 25, using the released zMenu 1.1.2.1 JAR.
  • Generated persisted item fixtures with the previous local zMenu JAR, then verified their metadata and quantities through the new API, mailbox DTOs, vaults and item holograms. Also checked API round trips, null items, vanilla/custom sound settings, custom playback arguments and disabled sounds.

Runtime checks used local Paper servers and simulated players for sound playback; audible in-game verification remains to be done.

- Upgrade zmenu-api to 1.1.2.1 and remove the local zMenu JAR and Gradle file dependencies.
- Use InventoryManager serialization for mailbox items, vault contents and icons, and item holograms.
- Create standard sounds through the API and preserve custom resource-pack sounds through SoundOption.
- Update the changelog and remove the local library JAR ignore exception.
- Document item deserialization through the registered zMenu service and its minimum version.
- Clarify custom sound playback, nullable sound options and mailbox item results.
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