Skip to content

Support Multiverse-Core 5 in the world alias provider - #12

Open
minoneer wants to merge 1 commit into
CodeCrafter47:masterfrom
minoneer:master
Open

Support Multiverse-Core 5 in the world alias provider#12
minoneer wants to merge 1 commit into
CodeCrafter47:masterfrom
minoneer:master

Conversation

@minoneer

Copy link
Copy Markdown

Problem

Multiverse 5 renamed com.onarandombox.MultiverseCoreorg.mvplugins.multiverse.core. PlayerDataAccess registers MultiverseWorldAliasProvider on the presence of a plugin named Multiverse-Core, with no version check, so on a Multiverse 5 server every lookup throws:

NoClassDefFoundError: com/onarandombox/MultiverseCore/api/MVPlugin
  at de.codecrafter47.data.bukkit.multiverse.MultiverseWorldAliasProvider.apply(:30)
  ... PaperCommandSendListenerProvider / AbstractBridge.updatePlayerData

Change

A new bukkit:multiverse5 module, mirroring the existing bukkit:multiverse module to keep supporting both versions.

Java version conflicts

Multiverse 5's jar is Java 17 (class 61), so javac 8 cannot read it. The module therefore declares toolchain 17 with options.release = 8. Built by JDK 17, but emitting Java 8 bytecode like everything else. Gradle auto-provisions the toolchain when it's not installed. This preserves runtime compatibility with Java 8.

The alternative is reflection, which avoids the build requirement but hides API drift. Happy to switch to a reflective version if you'd rather not have the mixed toolchain, but I believe this is the better trade-off.

Testing

./gradlew :bukkit:compileJava passes on both Java 8 and Java 17 Gradle JVMs; the new module emits class 52.

Verified on a live Paper 26.2 server running BungeeTabListPlus with the new classes, Multiverse-Core 5.8.0 and Java 25.

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