CA Update 1.4 - Save player's advancement progresses and API Changes!
WARNING: 1.4 and 1.4.1 have huge bugs regarding advancement progress saving, update to 1.4.2 AS SOON AS POSSIBLE! 1.4.1 (15/01/2018 Hotfix)
Bugfixes:
- Advancement Progress JSON String is no longer dumped into chat when saving progress
- Changing AdvancementManager Save Path wasn't working correctly
1.4 This is the biggest update since the release of the API, it ships features which are very useful and custom plugins will need less changes when a minecraft update is released, it's being worked on to fully support version-changes without changing every plugin using this API! (Deprecated Values and Methods will not recieve update support)
First of, the following Changes have been made to the API:
- The AdvancementDisplay now takes a custom Enum called AdvancementFrame instead of the NMS one!
- The Advancement now takes a custom key "NameKey" which is included instead of MinecraftKey
-
AdvancementManager#grantCriterion(Player player, Advancement advancement, String criterion)=>
AdvancementManager#grantCriteria(Player player, Advancement advancement, String... criteria): Now supports multiple criteria grants at once (less code has to be executed), same applies to AdvancementManager#revokeCriterion
- The AdvancementManager has been moved into another package
Also, these minor tweaks have been done:
- Player Advancement Progress used to be saved by player name, now it's saved by Player UUID to avoid bugs when changing Usernames
- The AdvancementManager no longer has a static method called getMainAdvancementManager, it only exists in the Main Class now (CrazyAdvancements)
And now, we get to the biggest feature this update, the ability to save the Progress a player has at a specific advancement, you can read about it in the main post which will be updated ASAP! (edit: has been added to the main post)