Add overloads to UnsafeValues#loadAdvancement and fix data persistence#12553
Open
Strokkur424 wants to merge 11 commits intoPaperMC:mainfrom
Open
Add overloads to UnsafeValues#loadAdvancement and fix data persistence#12553Strokkur424 wants to merge 11 commits intoPaperMC:mainfrom
Strokkur424 wants to merge 11 commits intoPaperMC:mainfrom
Conversation
masmc05
reviewed
May 16, 2025
paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
Outdated
Show resolved
Hide resolved
paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
Outdated
Show resolved
Hide resolved
542d449 to
a0fbc24
Compare
a0fbc24 to
203faa3
Compare
Member
Author
|
Rebased to 1.21.6 |
203faa3 to
71354d5
Compare
Warriorrrr
reviewed
Jun 26, 2025
paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
Show resolved
Hide resolved
Machine-Maker
requested changes
Jul 1, 2025
paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
Outdated
Show resolved
Hide resolved
paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
Show resolved
Hide resolved
71354d5 to
1d7630a
Compare
Member
Author
|
Rebased to 1.21.7 |
Member
Author
|
I've addressed all requested changes now. |
8a62c6a to
2d9f995
Compare
Member
Author
|
Rebased to 1.21.8 |
Member
Author
|
Rebased to 1.21.11 |
Warriorrrr
requested changes
Feb 5, 2026
Contributor
That's definitely a bug spigot didn't updated to the new layout of the advancements made recently which changed a bunch of plural names: <namespace>/advancement/<key>.json instead of <namespace>/advancements/<key>.json |
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.
This PR adds two new methods to
UnsafeValuesto improve the workflow of working with Advancements:loadAdvancement(NamespacedKey key, String advancement, boolean persist)loadAdvancements(Map<Key, String> advancements, boolean persist)The first method just adds a new overload to the existing
loadAdvancementmethod, which allows for disabling the printing into the Bukkit datapack. From my testing, this doesn't actually persist the Advancement anyways, so I am not even entirely certain what the point of storing it in the Bukkit datapack is, but that's probably a bug and it was intended to work that way.The second method allows for bulk-registering advancements.
Example of registering two enchantments using the new `loadAdvancements` method
Testing the Advancements, they work as intended even if registered in bulk.