Question Invalid advancements folder name

  • After careful consideration and due to limited usage, we’ve made the decision to discontinue the PaperMC forums. Moving forward, we recommend using Hangar for plugin uploads, and for all other community discussions and support, please join us on Discord.

BadDolphin

New member
Aug 19, 2024
1
0
1
Look at this code:
Java:
Bukkit.getUnsafe().loadAdvancement(namespacedKey,"...");
Bukkit.getAdvancement(namespacedKey);

1.20.6

Bukkit.getUnsafe().loadAdvancement() method creates json file for advancement in the "server\world\datapacks\bukkit\data\namespace\advancements".
Bukkit.getAdvancement() also finds the file in the "...\advancements" folder.

1.21 and earlier
Bukkit.getUnsafe().loadAdvancement() method creates json file for advancement in the "...\advancements".
But Bukkit.getAdvancement() looks for the file in the "...\advancement" folder.

So if I don't rename the folder from "advancementS" to "advancement" after creating the json files, the server won't be able to find them using the Bukkit.getAdvancement() method.
I think this happens because in version 1.21 the developers changed the names of some folders in the resource packs (advancements -> advancement).

Can I manually specify paths to create files using loadAdvancement()?