Crazy Advancements API
2.1.21Powerful, light-weight API for creating Advancements programmatically
2.1.21latestUpdate 2.1.21 - Update to Minecraft 1.21.4Dec 6, 2024 General Changes: - Update to Minecraft 1.21.4 Github Release: https://github.com/ZockerAxel/CrazyAdvancementsAPI/releas…2.1.20Update 2.1.20 - Update to Minecraft 1.21.3Dec 6, 2024 General Changes: - Update to Minecraft 1.21.3 Github Release: https://github.com/ZockerAxel/CrazyAdvancementsAPI/releas…2.1.19Update 2.1.19 - Update to Minecraft 1.21Jun 15, 2024 General Changes: - Update to Minecraft 1.21 Github Release: https://github.com/ZockerAxel/CrazyAdvancementsAPI/releas…2.1.18Update 2.1.18 - Update to Minecraft 1.20.5Apr 28, 2024 General Changes: - Update to MInecraft 1.20.5 - Update to Java 21 Github Release: https://github.com/ZockerAxel/CrazyAdvancementsAPI/releas…2.1.17Update 2.1.17 - Update to Miencraft 1.20.3Dec 5, 2023 General Changes: - Update to Minecraft 1.20.3 As always you can find the downloads for jars that include the javadoc and/or a pom file on Github: https://github.com/ZockerAxel/CrazyAdvancementsAPI/releas…2.1.16Update 2.1.16 - Packet FixesOct 12, 2023 Bug Fixes: - Fixed Packets not being sent - Fixed Events not firing for Players switching or closing their advancement tab/screen As always you can find the downloads for jars that include the javadoc and/or a pom file on Github: https://github.com/ZockerAxel/CrazyAdvancementsAPI/releas…2.1.15Update 2.1.15 - Update to Minecraft 1.20.2Oct 8, 2023 General Changes: - Update to Minecraft 1.20.2 API Changes: -AdvancementProgress(Map<String, Criterion<?>>, String[][])is now deprecated, useAdvancementProgress(String[][])instead -PacketConverter.createDummy(NameKey)is now deprecated as it is no longer required for creating fake parent advancements As always you can find the downloads for jars that include the javadoc and/or a pom file on Github: https://github.com/ZockerAxel/CrazyAdvancementsAPI/releas…2.1.14Update 2.1.14 - Update to Minecraft 1.20Jun 7, 2023 General Changes: - Update to Minecraft 1.20 Note: For now, telemetry events are turned off for Advancements created with this API (Mojang introduced them in 1.20), in the future there might be a way to turn them on for advancements created with this API. As always you can find the downloads for jars that include the javadoc and/or a pom file on Github: https://github.com/ZockerAxel/CrazyAdvancementsAPI/releas…2.1.13Update 2.1.13 - Update to Minecraft 1.19.4Mar 17, 2023 General Changes: - Update to Minecraft 1.19.4 As always you can find the downloads for jars that include the javadoc and/or a pom file on Github: https://github.com/ZockerAxel/CrazyAdvancementsAPI/releas…2.1.12Update 2.1.12 - Update to MInecraft 1.19.3Dec 10, 2022 Changes: - Update to Minecraft 1.19.3 As always you can find the downloads for jars that include the javadoc and/or a pom file on Github: https://github.com/ZockerAxel/CrazyAdvancementsAPI/releas…2.1.11Update 2.1.11 - Minor Bugfix UpdateOct 3, 2022 System Changes: - The API now uses it's Logger instead of System.out for printing messages Bug Fixes: - Fixed Player Name being incorrectly formatted in Advancement Completion Messages, especially when using custom Colors in Display Names As always you can find the downloads for jars that include the javadoc and/or a pom file on Github: https://github.com/ZockerAxel/CrazyAdvancementsAPI/releas…2.1.10Update 2.1.10 - Update to Minecraft 1.19Jun 7, 2022 Changes: - Update to Minecraft 1.19 - Added Events for when Advancements are granted or revoked via the Advancement Manager Bug Fixes: - Fixed NPE when unloading Visibility Status when no Visibility Status had been saved before As always you can find the downloads for jars that include the javadoc and/or a pom file on Github: https://github.com/ZockerAxel/CrazyAdvancementsAPI/releas…2.1.9Update 2.1.9 - Fix for Advancement VisibilityMay 19, 2022 Bug Fixes: - Fixed Granted Advancements not showing up when they were not visible before As always you can find the downloads for jars that include the javadoc and/or a pom file on Github: https://github.com/ZockerAxel/CrazyAdvancementsAPI/releas…2.1.8Update 2.1.8 - Fix for Advancement Title Color ChangingMay 18, 2022 Bug Fixes: - Fixed Title Colors of Advancements being modified when getting a Message for an Advancement (or displaying it) If you want to get the JavaDoc packaged with the jar, you can find the download on Github: https://github.com/ZockerAxel/CrazyAdvancementsAPI/releas…2.1.7Update 2.1.7 - Small Visibility Bugfix UpdateMay 13, 2022 API Changes: - Added Methods to unload Visibility Status for individual Advancements or Managers Bug Fixes: - Fixed the /careload Command throwing an error when specifiying a Category - Fixed Visibilities not updating when Advancements are granted or revoked - Fixed Visibilities being improperly evaluated to be visible even though they would not show up because their parent(s) were invisible, leading to them not updating their Visibility even after the invisible parent(s) became visible - Fixed Visibility Status not being cached after evaluating when calling AdvancementManager#updateVisibility(Player player) f you want to get the JavaDoc packaged with the jar, you can find the download on Github: https://github.com/ZockerAxel/CrazyAdvancementsAPI/releas…2.1.6Update 2.1.6 - Command ImprovementsMar 24, 2022 General Changes: - Added /careload [Category] Command. Due to a bug, you currently can't specify the Category and have to reload everything. - Added an optional Operation Argument to the end of the /setprogress Command, so that you can now modify the progress dynamically using Command Blocks. Valid Operations are set (default), add, subtract, multiply, divide, power. Bug Fixes: - Players can no longer tab-complete Command Arguments when they have insufficient permissions to run that command. If you want to get the JavaDoc packaged with the jar, you can find the download on Github: https://github.com/ZockerAxel/CrazyAdvancementsAPI/releas…2.1.5Update 2.1.5 - Update to Minecraft 1.18.2 and more!Mar 6, 2022 General Changes: - Update to Minecraft 1.18.2 - Added Custom Item Definitions under <Server Directory>/plugins/CrazyAdvancementsAPI/custom_items/. Custom Item Definitions contain the Item Type and the Custom Model Data. These Custom Items may then be used in JSON Advancements or the/showtoastCommand - Added Support for Custom Player Heads in the/showtoastCommand and JSON Advancements. For example: Code (Text): /showtoast @s player_head:@s Player Head will show the executing Player's player head. When implementing this it worked for both offline and online Players but somehow 1.18.2 broke it and i will try to re-add offline Player Heads soon - Added Support for supplying the/showtoastCommand and JSON Advancements with Damage Data. For example you may show a broken Elytra using/showtoast @s elytra:431 broken elytraAPI Changes: - ToastNotification does no longer create a CrazyAdvancements Advancement but NMS ones directly to send the Packet which increases performance The File Size of the API has been reduced by a lot by not increasing the Javadoc within it by default, If you still want to get the JavaDoc packaged with the jar, head over to github to download it: https://github.com/ZockerAxel/CrazyAdvancementsAPI/releas…2.1.4Update 2.1.4 - Lots of QoL Changes and FixesJan 8, 2022 General Changes: - Changed the /showtoast Command from /showtoast <Player> <Icon> <Message> to /showtoast <Player> <Icon> [Frame] <Message> to now be able to set which Frame should be used in the Toast, however this Argument is optional which means Commands from prior versions still work (so you don't have to update your command blocks) - You can now ommit the flags in JSON Advancements instead of having an empty array if you don't want any flags API Changes: - Added VisibilityAdvancementsPacket class, which works just like the AdvancementsPacket but strips Advancements from the packet which are not visible to the Player Bug Fixes: - If a Folder with the same Name as a Save File exists, it will be deleted if it's empty or an error will be thrown if it is not empty - Progress will now be unloaded upon leaving the Server for Advancements added through JSON - Fixed Typo in Permission Message - Fixed Save Files not being loaded if criteria or progress data was missing instead of empty2.1.3Update 2.1.3 - More Bug Fixes!Dec 26, 2021 Bug Fixes: - Fixed AdvancementManager revoke Methods granting Advancements instead of revoking them - Fixed Reward function of JSON Advancements not being run as the player that got the reward - Fixed Chat Color Issue in Command Error Message2.1.2Update 2.1.2 - Fix for nested JSON Advancement FilesDec 25, 2021 Bug Fixes: - Nested Advancement JSON Files now get the correct name assigned (for example advancement in folder advancements/a/b/c/advancement.json used to get the name "a:c/advancement" but will now get the name "a:b/c/advancement" as intended)2.1.1Update 2.1.1 - Fixes for JSON AdvancementsDec 25, 2021 General Changes: - You can now ommit the "criteria" field in the json string if you just want a progress of 1 to be required API Changes: - Added hashKey() Override to NameKey (now NameKeys with same namespace and key will have the same hashKey) Bug Fixes: - Fixed namespace being incorrect for JSON Advancements2.1Update 2.1 - Support for JSON AdvancementsDec 25, 2021 This release aims to allow non-developers to use the API to create awesome Advancement Setups. General Changes: - Advancements will now be loaded from JSON files within the Plugin Directory - Added Support for Target Selectors @a, @p, @s and @r to all Commands API Changes: - Lots of new classes related to JSON Advancemements - New Class AdvancementFunctionReward which executes a .mcfunction function as the player but with console priviliges2.0.6Update 2.1 - Support for JSON AdvancementsDec 25, 2021 This release aims to allow non-developers to use the API to create awesome Advancement Setups. General Changes: · Advancements will now be loaded from JSON files within the Plugin Directory · Added Support for Target Selectors to all Commands API Changes: · Lots of new classes related to JSON Advancemements · New Class AdvancementFunctionReward which executes a .mcfunction function as the player but with console priviliges2.0.5Update 2.0.5 - Fix for Save Files being read incorrectlyDec 24, 2021 Bug Fixes: - Save Files will now properly load (Save File Saving is unchanged, so Save Files from Version 2.0 to 2.0.5 can be loaded without any issues in this version)2.0.4Update 2.0.4 - Fix Save Files not being createdDec 6, 2021 Bug Fixes: - Empty folders similar to Save File names will no longer be created - Folders with the same names as the Save File Names will no longer prevent Save Files from being created2.0.3Update 2.0.3 - Fix for Player Progress SavingDec 4, 2021 Bug Fixes: - Fixed a bug that prevented the Advancements Array passed in AdvancementManager#saveProgress(Player player, Advancement... advancements) from being respected2.0.2Update 2.0.2 - Fix for Saving Player ProgressDec 4, 2021 Bug Fixes: - Player Progress can now be saved even if a valid Save File didn't exist previously2.0.1Update 2.0.1 - Update to Minecraft 1.18Dec 4, 2021 This version updates CrazyAdvancementsAPI to Minecraft 1.18 API Changes: Added AdvancementProgress#getCriteriaProgress() which returns an int Added AdvancementProgress#getRemainingCriteria() which returns an Iterable<String> AdvancementProgress#getAwardedCriteria() now returns an Iterable<String> instead of a Set<String> Added AdvancementProgress#isDone() which is equivalent to Advancement#isGranted() but on the AdvancementProgress level2.0Update 2.0 - Full API RewriteNov 22, 2021 It's a big one! In this update the API was rewritten to fix some long-standing issues that could now finally be resolved with a much cleaner codebase. As this is a full rewrite, a real changelog is not easily created, which simply means that not all changes will be listed here. Old Save Files will no longer work with this version. For a full guide on how to use this new version, see https://docs.crazyadvancements.endercentral.eu General Changes: - Added New Command: /setprogress <Player> <Manager> <Advancement> <Progress> including Tab Completion - Removed the File Advancement Manager which loaded Advancements from JSON files API Changes: - Renamed Main Class from CrazyAdvancements to CrazyAdvancementsAPI - Added New Class ToastNotification for easier creation of Toasts - Added New Class AdvancementsPacket which allows you to send Advancements Packets yourself - Changed how Criteria works, Advancements now expect an instance of the Criteria class instead of a Number which also allows for more complex Advancements - Changed how Progress is stored for an Advancement - Changed where Save Files are located - Changed Save File Format - Removed SaveMethod - Removed Several Events related to Criteria - Removed Several Save and Load Methods from AdvancementManager1.14.3Update 1.14.3 - Bug Fix for Advancement Completion MessagesJul 19, 2021 Bug Fixes: - Fixed a bug that lead to Advancement Completion Messages' hover event having incorrect content - Reverted Default Text Color of Advancements from green to white (pre-1.14.2 behavior)1.14.2Update 1.14.2 - Update to Minecraft 1.17Jun 19, 2021 This version updates CrazyAdvancementsAPI to Minecraft 1.17 The NMS Reobfuscation by Spigot lead to a few issues that have now been fixed. As i wanted to release this version as soon as possible, some features are untested in this update which could lead to a few issues in this version, so be sure to report any inconsistencies compared to the old behavior if you encounter any.1.14.1Update 1.14.1 - Hotfix to Offline Player SavingJan 19, 2021 Bug Fixes: - Fixed a bug that caused progress not being saved for offline players when they have not been online before1.14Update 1.14 - Improvements to Packet Size and Save File SizeJan 19, 2021 API Changes: - Added AdvancementManager#setHiddenBoolean(boolean hiddenBoolean) and AdvancementManager#getHiddenBoolean(): When set to true, hidden advancements that have not been granted yet will have a line drawn to them when they are in visible range despite not being visible. Can be used to create empty advancement tabs where there are no advancements visible when the tab's only advancement is a hidden root advancement. Defaults to false - Added AdvancementManager#setCriterionPrefix(String criterionPrefix) and AdvacementManager#getCriterionPrefix(): Prefix infront of criterion names, Setting it to an empty string reduces save file size and packet size. Should be set before adding advancements or loading progress. Defaults to " criterion.". CHANGING THIS SETTING WILL RESET EVERYBODYS PROGRESS IN THE CURRENT MANAGER IF YOU DO THIS FOR THE FIRST TIME. - Added AdvancementManager#setCriterionNamespace(String criterionNamespace), AdvancementManager#setCriterionKey(String criterionKey) and respective getters: The combination of these strings is used as a Namespaced Key that is used in packets sent to the client. Setting it to an empty string reduces packet size. Only works when criteria for advancements have not been generated yet (Use this method before adding advancements). Default to " minecraft" and " impossible" - Added Advancement#setSaveMethod(SaveMethod saveMethod) and Advancement#getSaveMethod(): When you don't work with expert features, using the NUMBER Save Method will significantly shrink your save file sizes (only if your advancement requires 2 or more criteria). You can always switch from the DEFAULT to the NUMBER Save Method and your data will be converted automatically. If you want to switch the other way round, you have to load data while it is set to NUMBER and save data while it is set to DEFAULT to prevent save file corruption. Defaults to DEFAULT Bug Fixes: - Fixed a bug that caused progress to never unload when unloading progress - Fixed a bug that caused progress not being saved for offline players when they have not been online since their progress was loaded - Fixed a bug that caused progress not being saved when players have never been added to the manager in the first place - Minor bug fixes1.13.11Update 1.13.11 - Update to Minecraft 1.16.4Nov 9, 2020 No major changes in this version apart from the update to Minecraft 1.16.41.13.9Fix to plugin.ymlAug 12, 2020 The plugin.yml contained incorrect verison information, this has now been resolved1.13.8Update 1.13.8 - Update to Minecraft 1.16.1Jun 25, 2020 No major changes in this version apart from the update to Minecraft 1.16.1. (A few things have changed about advancements so if there are any issues you run into, send me a message so i can fix them)1.13.7Update 1.13.7 - Update to Minecraft 1.15Dec 11, 2019 No changes in this version, only update to Minecraft 1.151.13.6Update 1.13.6 - Fix for Minecraft 1.14.4Aug 8, 2019 This version of the API no longer works in Minecraft 1.14-1.14.3 because of method changes, if you need to run one of those Minecraft versions, use v1.13.51.13.5Update 1.13.5 - Update to Minecraft 1.14May 28, 2019 No changes in this version, only update to 1.141.13.4Update to Minecraft 1.13.1 (fixed)Sep 12, 2018 Fixed Update to Minecraft 1.13.11.13.3Update 1.13.3 - Ease of Use AdditionsAug 14, 2018 1.13.2Update 1.13.2 - Bug FixAug 2, 2018 Fixed a bug that threw a NPE when no Advancement Reward was set (My bad :/)1.13.1Update 1.13.1 - Target Selector Bug FixJul 22, 2018 Bug Fixes: - Fixed MC1.13 Target Selectors not working in Commands1.13Update 1.13 - MC 1.13 Update & AdditionsJul 22, 2018 This Version is the first one for MC 1.13 General Changes: - In the config.yml there is now a setting which allows the server owner to set the Player Progress saving should be done via UUID or Player Name API Changes: - Added Advancement#setReward(AdvancementReward reward) to allow setting rewards without using AdvancementGrantEvent (does not work with Offline Advancement Granting!) Bug Fixes: - Fixed a Bug preventing the Advancement Saving Method from adding the Icon to the JSON1.12.1Update 1.12.1 - Main Advancement Manager removed!May 12, 2018 This update is just a preparation for future updates, that devs can implement their Plugins using their own Advancement Managers instead of the Main Advancement Manager (which has been deprecated for quite a long time now) Removed API Features: - Main Advancement Manager has been removed - File Advancement Manager has been added to re-implement the feature to add advancements using .json files now that the Main Manager is removed. However this one is not accessible but can be used by commands1.12Update 1.12 - Features for Non-DevsMay 6, 2018 NOTE: MainAdvancementManager will be removed NEXT Update This Version adds a whole row of new features for People who don't know how to code. The update logs are now seperated between API Features and General Features. New General Features: - Added New Command /cagrant <Player> <Manager>|file <Advancement> [Criteria...] with Tab Completion - Added New Command /carevoke <Player> <Manager>|file <Advancement> [Criteria...] with Tab Completion - The <Player> Selector now allows all Vanilla Selectors (@r, @a[r=1], etc..) except @e (because Non-Player-Entities aren't allowed) (also works for /showtoast now) - The current commands are no longer limited to Operators, but now depend on permissions (crazyadvancements.command.*, crazyadvancements.command.showtoast, crazyadvancements.command.grantrevoke) New API Features: - Added the following Events: CriteriaGrantEvent, CriteriaRevokeEvent, OfflineCriteriaGrantEvent and OfflineCriteriaRevokeEvent - Added AdvancementManager#makeAccessible(String name) to make your Manager accessible using a unique Name (allows modification using commands) - Added AdvancementManager#resetAccessible() which resets the accessibility status - Added AdvancementManager#getName() which returns the Name if it is accessible - Added static AdvancementManager#getAccessibleManager(String name) and AdvancementManager#getAccessibleManagers() to access Managers1.11.1Update 1.11.1 - Bug FixMay 1, 2018 Bug fixed: - The /showtoast Command can now only be run by operators, the console or command blocks1.11Update 1.11 - Toast MessagesApr 28, 2018 New Features: - Added Advancement#displayToast(Player player) to display a new Toast Notification no matter if the advancement is visible to the player or not - Added New Command /showtoast <Player> <Icon> <Message> with Tab Completion1.10.5Update 1.10.5 - Bug FixApr 8, 2018 Bug fixed: - Advancement Chat Message will now properly display the advancement in the correct color (dark purple for challenges, green for tasks and goals) NOTE: Custom Advancement Title Colors will still override the above!1.10.4Update 1.10.4 - Bug FixApr 5, 2018 Bug fixed: - Advancements will no longer falsely be made visible if a single criterion is granted but not the whole advancement Known Bugs (Hopefully fixed soon): - Granting an advancement that is not visible might show 2 toasts (but only shows one chat message) - Tabs get re-organized when adding an advancement with negative coordinates1.10.3Update 1.10.3 Bug Fixes & Unloading ProgressMar 15, 2018 New Features: - Added AdvancementManager#unloadProgress(UUID uuid), AdvancementManager#unloadProgress(UUID uuid, String namespace) and AdvancementManager#unloadProgress(UUID uuid, Advancement... advancements) (only works for online Players) Bug(s) fixed: - Granting an advancement that isn't visible will now show a toast if it is set to (if other advancements get revealed in the process which are granted, they will also show a toast, but if you don't change it, they are always visible when they are granted so shouldn't be a big deal)1.10.2Update 1.10.2 - Options for Offline PlayersFeb 20, 2018 Before I get to the changes, i quickly want to mention that in the next big version there will be a complete recode of the AdvancementManager since there was just stuff added every update without taking old things into account etc... It has become very difficult to fix some problems because of the current way it has been programmed. I will try to keep as many methods the way they are now, but the behind-the-scene stuff will definitely change a lot! New Features: - Added grantAdvancement(UUID uuid, Advancement advancement), revokeAdvancement(UUID uuid, Advancement advancement), grantCriteria(UUID uuid, Advancement advancement, String... criteria), revokeCriteria(UUID uuid, Advancement advancement String... criteria), setCriteriaProgress(UUID uuid, Advancement advancement, int progress), getCriteriaProgress(UUID uuid, Advancement advancement), getProgressJSON(UUID uuid), getProgressJSON(UUID uuid, String namespace), saveProgress(UUID uuid, String namespace) to AdvancementManager to also support these features for offline offline players This lead to the additions of the following events: OfflineAdvancementGrantEvent, OfflineAdvancementRevokeEvent, OfflineCriteriaProgressChangeEvent1.10.1CA Update 1.10.1 - BugsFeb 15, 2018 So, i've been struggling with this bug for quite a while and i can't really find a solution to it, for now, i will be providing a partial fix for that bug. Bug Fixes: - Granting an advancement that isn't visible will now update the visibility of the whole row and is visible afterwards (at least if you dont use a custom visibility that changes that). It still doesn't show any toast message when a non-visible advancement is granted, but I'll try to fix it ASAP!1.10CA Update 1.10 - New Events and Javadoc!Feb 13, 2018 This update brings a few events and the fantastic addition of javadoc, lets get to the changes! New Features: - Added the following Events: AdvancementGrantEvent, AdvancementRevokeEvent and CriteriaProgressChangeEvent - Added Javadoc to the API, so now you can get more information about all methods you use - CrazyAdvancements#getMainAdvancementManager() is now Deprecated as it will be removed in a future version The Javadoc is also avaliable at https://crazyadvancements.endercentral.eu1.9.2CA Update 1.9.2 - Bug Fixes and Method Name ChangesFeb 10, 2018 Smoothened out a few bugs and done some improvements Features added: - Added AdvancementManager#loadCustomProgress(Player player, String json) to load all advancements (not taking namespace into account) since you can also get the save string for all advancements - Added AdvancementManager#loadCustomProgress(Player player, String json, String namepace) to support only loading a set namespace (as you can also save a set namespace) - Renamed AdvancementManager#loadProgress(Player player, String json, Advancement... advancementsLoaded) => AdvancementManager#loadCustomProgress(Player player, String json, Advancement... advancementsLoaded) to allow adding the above methods and having them all have the same method name without them becoming ambiguous with other load methods Bugs fixed: - Fixed bugs regarding getting/saving the progress json - Only advancements loaded from the default folder are now in the advancement map (as intended) - Minor bug fixes1.9.1CA Update 1.9.1 - Bug fixesFeb 6, 2018 It's time for bug fixes again! Features added: - Added AdvancementManager#loadProgress(Player player, String namespace) which will load the progress of EVERY advancement in the specified namespace (in that advancement manager) Bug Fixes: - AdvancementManager#loadProgress(Player player, String json, Advancement... advancementsLoaded) read from the default file instead of using the json to load1.9CA Update 1.9 - More Display Icon PossibilitiesFeb 6, 2018 So, until now Advancement Display Icon has been very limited but with this update we are removing these limitations. You can now just give the Display an ItemStack and it will just use that item stack to change the advancement. This means, that you can now use custom player skulls and enchantments in there, which wasn't possible in older versions. Features added: - 4 New AdvancementDisplay Constructors which take an ItemStack instead of a Material (old Constructors will still work and aren't planned to be removed anytime soon, or might not even be removed at all) - Removed AdvancementDisplay#setIconData(int data) and AdvancementDisplay#getIconData() because they are now stored inside the item stack (they were deprecated since the release of this API) - CrazyMaterialAPI has been marked as deprecated and will be removed in the near future - When using String to set the title of an advancement display and you use a color code, a color reset to green will automatically appended to your title string to make the text message look nicer, although it is highly recommended to use JSONMessage instead as it adapts the colors of the brackets to which color you set it to1.8CA Update 1.8 - Advancement Position Origin and more features!Feb 6, 2018 Half of a week without updates, that didn't happen often within the last month, so it's time to break that break! Changes included: - Added AdvancementDisplay#setX(float x) and AdvancementDisplay#setY(float y) in case you only wanted to modify one of them - Added AdvancementDisplay#setPositionOrigin(Advancement originPosition) which you can use if you don't want your coordinates to be aligned globally, but by the specified advancement. So if you set x to 1 and the origin to it's parent, it will be 1 to the right from the parent. Very useful stuff! Also added AdvancementDisplay#getPositionOrigin() - Just returns the set one or null if it's aligned globally - Added Advancement#generateX() and Advancement#generateY() which will return the global x and y (getX and getY will return the coordinates relative to the position origin) - Improved performance when using multiple advancement managers Bug Fixes: - Coordinate calculation will now be cross-saved between Advancement Managers, so no more glitching when multiple managers add things to the same tab - Advancement caching now also works correctly with coordinates1.7CA Update 1.7 - Updates to Advancement CoordinatesFeb 3, 2018 This update brings a few more features, but most importantly removes the bug that advancement tabs could flicker when negative coordinates were used. New Features: - AdvancementManager#update(Player player, Advancement... advancementsUpdated) => AdvancementManager#updateProgress(Player player, Advancement... advancementsUpdated) - Added AdvancementManager#update(Player player) and AdvancementManager#update(Player player, NameKey tab) - Added Advancement#getTab() which returns their advancement tab - Added Advancement#getRootAdvancement() which returns the root advancement of the advancement's tab Bugs fixed: - Fixed Advancement#setCriteria(int criteria) not updating the criteria if the advancement had previously already been added to any manager - Fixed CrazyAdvancements#clearActiveTab(Player player) not working and printing an error into the console - Fixed Advancement Flickering when using negative coordinates - Minor Bug fixes1.6.4CA Update 1.6.4 - Bug Fix FixJan 31, 2018 The previous Bug Fix didn't work properly, so I pushed this update1.6.3CA Update 1.6.3 More Bug fixesJan 31, 2018 Another Bug Fix Update today: - Bug fixed that Advancement Visibility didn't update properly when joined first time after server start or reload1.6.2CA Update 1.6.2 - Bug fixes againJan 28, 2018 This is one of those Bug-fix Updates! Bugs fixed: - It should no longer break when you register your advancements in onEnable depending on what your plugin name is1.6.1CA Update 1.6.1 - Bug removed!Jan 27, 2018 This version only contains a few bug fixes regarding when the advancement criteria is generated: - Fixed Bug that Advancement#setCriteria() didn't do anything (and some minor bugs that were related to that)1.6CA Update 1.6 - Huge Update to Advancement VisibilityJan 19, 2018 In this update, a huge overhaul to Advancement Visibility (before: boolean hidden) has been done. You can now use one of the pre-made Visibilties (ALWAYS, PARENT_GRANTED, VANILLA, HIDDEN) or create custom visibilities that can rely on any code you have in your plugin. The following changes have been done: - Added abstract class AdvancementVisibility, which you can create a new instance of and override the isVisible(Player player, Advancement advancement) method to create custom visibilities. - All current constructors of AdvancementDisplay are now Deprecated and will be removed in a version in the near future. the new constructors are almost the same as the old ones but they don't allow a boolean for hidden anymore but an AdvancementVisibility to set when it should be visible. For the time being, hidden=true will set it to AdvancementVisibility.HIDDEN and hidden=false will set it to AdvancementVisibility.ALWAYS (same behavior as in previous versions) - Added AdvancementManager#updateAllPossiblyAffectedVisibilities(Player player, Advancement from) which will update all parents, their parents and all childs and their childs (etc...) if their isVisible changed - Added AdvancementManager#updateVisibility(Player player, Advancement advancement) which updates the visibility of the selected advancement - Added Methods to Advancement regarding parents and children - Changed some Methods that still used MinecraftKey to use NameKey instead NOTE: These Changes also affect the JSON-saving/loading of advancements, so if you use file-based advancement loading, have a look on the main page to see how you have to create them now1.5CA Update 1.5 - Save and Load advancements from JSONJan 16, 2018 Welcome to CrazyAdvancements v1.5, it's been painful work to put this together at some parts, but overall it was a great thing to develop. Let's get to the changes! - Added static Advancement#fromJSON(String json) and static Advancement#fromJSON(JsonElement json) which can generate an advancement from JSON (see the main post to learn how you have to set it up) - Added Advancement#getAdvancementJSON() returning the advancement element as JSON format (so you can save it or do whatever you want with it) - You can deploy .json files under (SERVERDIRECTORY)/plugins/CrazyAdvancementsAPI/advancements/main which will add the advancements (same JSON as above) to the Main Advancement Manager Bug fixes: - Chat Message on advancement grant displayed depending on if toast was shown rather than if it should announce a message, now fixed! - Minor Bugfixes1.4.2CA Update 1.4.2 - Bug Fixes and ease-of-use improvementsJan 15, 2018 There were still some nasty bugs in the last few versions, but many should be fixed by now! The following changes have been done: - Removed AdvancementManager#setSavePath because it caused too much trouble with the rest of the code - Instead implememented new methods to get the JSON Save String yourself and save it wherever you want (File, MySQL Database, etc...): AdvancementManager#getProgressJSON(Player player) Returns the progress JSON containing info about all the advancements in the current manager AdvancementManager#getProgressJSON(Player player, String namespace ) Returns the progress JSON containing info about all advancements with namespace in the current advancement manager AdvancementManager#loadProgress(Player player, String json, Advancement... advancementsLoaded) Will load all advancements in advancementsLoaded using the entered JSON String - AdvancementManager#loadProgress(Player player, Advancement advancement) => AdvancementManager#loadProgress(Player player, Advancement... advancementsLoaded) Now supports multiple advancements to be loaded at once (less code has to be executed). Same applies to saveProgress! Also, the following bugsfixes have been done: - Saving Advancements no longer deletes old saved information but instead updates it - Minor bug fixes1.4.1CA Update 1.4 - Save player's advancement progresses and API Changes!Jan 15, 2018 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)1.4CA Update 1.3Jan 14, 2018 This update was added to make some things easier, there still is stuff to do, which will be added in a new update coming very soon! Features added: - New Methods were added to CrazyAdvancements: CrazyAdvancements#setActiveTab(Player player, String rootAdvancement) to also allow setting tab without a MinecraftKey, CrazyAdvancements#setActiveTab(Player player, MinecraftKey rootAdvancement, boolean update) which will not send a packet to the player if update is false, CrazyAdvancements#clearActiveTab(Player player) which will clear the tab and the player will not have an active tab, CrazyAdvancements#getActiveTab(Player player) is a way to get the current tab, is still in development and might not work 100% of the time1.3Jan 13, 2018 1.2Bug Fixes Update 1.2Jan 9, 2018 So there still were some major issues in the last Update, that we were able to fix today: - Adding advancements multiple times to the same Manager would add them multiple times to the advancements list, although it shouldn't - The Advancement Message was still displayed if you disabled it globally - AdvancementManager#getAdvancement didn't work properly - Adding an Advancement again wouldn't update it properly Also, the following was added: - An option has been added to every advancement manager, to disable advancement messages in that manager only - AdvancementManager#getAdvancements now returns a copy of the original list instead Changes have been made to the main page, so stay informed!1.1Bug Fixes UpdateJan 7, 2018 This Update fixes several bugs which caused advancements not being placed in their respective TAB when a Player connected and the advancements were already loaded and when a reload had been performed. Features added: - Global setting added to disable Advancement Messages Code (Text): CrazyAdvancements.setAnnounceAdvancementMessages(true); - Added Method to Advancement to get the message IChatBaseComponent Code (Text): Advancement#getMessage(Player player)1.0Jan 6, 2018
Similar projects
Plugin →Let Me Despawn
Improves performance by tweaking mob despawn rules. Say bye to pesky unintentional persistent mobs.
26.2MSueta
JourneyMap
Real-time map used for mapping in-game or your browser as you explore.
14.7MSueta
Emotecraft
Create your own emotes in Minecraft.
7.9MSueta
Simple Tpa
A simple tpa plugin which sends requests
5.4MSueta
Common Network
Forge and Fabric Unified Networking Solution
4.7MSueta
Set Home
A lightweight plugin for players to set their homes.
3.8MSueta