-
Notifications
You must be signed in to change notification settings - Fork 39
Support 1.20.6 #271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support 1.20.6 #271
Conversation
We don't need to do this as from what i see Lines 287 to 292 in baf2d79
And spigot already auto renames these fields for plugins that are built for older minecraft versions: https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/src/main/java/org/bukkit/craftbukkit/legacy/FieldRename.java . So no error will be thrown. |
|
This pr conflicts with #219. |
This does need to be updated as otherwise dough cannot compile if the consumer is compiling against 1.20.5+. The suggested fix is to refactor it to use the bukkit |
|
Done |
| Property property = profile.getProperties().get("textures").iterator().next(); | ||
|
|
||
| PlayerProfile paperPlayerProfile = Bukkit.createProfile(profile.getId(), profile.getName()); | ||
| paperPlayerProfile.setProperty(new ProfileProperty(property.name(), property.value(), property.signature())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Java started using records in Java 16, while Authlib didn't use records until much later. As of the last version of Paper 1.18.2 that depended on Authlib, Property was still a class. Therefore, you might need to use reflection to call the getter method of an older version of Property.
fix: use old getter of property for older versions
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Based on the result server testing by boomer:
dough-items/src/main/java/io/github/bakedlibs/dough/items/nms/ItemNameAdapterPaper.java
Show resolved
Hide resolved
The adapter is using adventure which was not bundled into Paper until 1.19.4 so to support it, we can only use this version or higher.
1b94fb1 to
66870dd
Compare
ea6c989 to
67f9cb9
Compare
Changes
PlayerHeadAdapterspom.xmlin moduledough-protectionbecause dough couldn't be compiled. This is because one of dependencies provided very old version of bukkit which broke compilationpom.xmlchanged from spigot to paper to be able to use paper features in adapters