CryptoMorin / XSeries

Library for cross-version Minecraft Bukkit support and various efficient API methods.
https://www.spigotmc.org/threads/378136/
MIT License
390 stars 128 forks source link

[XReflection] - CraftBukkit version detection using package broken #280

Closed stijnb1234 closed 2 months ago

stijnb1234 commented 3 months ago

Description The version relocation of CraftBukkit has been removed as of 1.20.5, so now CraftBukkit classes are in the main org.bukkit.craftbukkit package, without the .v.

This affects (and breaks) at least: https://github.com/CryptoMorin/XSeries/blob/7cfcc05b283f97a53063c267504f5f5a46484208/src/main/java/com/cryptomorin/xseries/reflection/XReflection.java#L99-L128

See: https://forums.papermc.io/threads/important-dev-psa-future-removal-of-cb-package-relocation.1106/

Version 1.20.5 or higher

CJCrafter commented 3 months ago

This is only in paper, and can be solved using their remapping library: "xyz.jpenilla:reflection-remapper:0.1.1"

CryptoMorin commented 3 months ago

findNMSVersionString() is an internal method, just like marked. It's not intended to retain its functionality in newer versions. If you for some reason use it directly and you have a way to make it work in newer versions, I'll be happy to accept a PR.