Support Multiverse-Core 5 in the world alias provider - #12
Open
minoneer wants to merge 1 commit into
Open
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.
Problem
Multiverse 5 renamed
com.onarandombox.MultiverseCore→org.mvplugins.multiverse.core.PlayerDataAccessregistersMultiverseWorldAliasProvideron the presence of a plugin namedMultiverse-Core, with no version check, so on a Multiverse 5 server every lookup throws:Change
A new
bukkit:multiverse5module, 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 17withoptions.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:compileJavapasses 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.