| Name | Advancement |
| Syntax | advancement [id:<name>] (delete/grant:<players>/revoke:<players>/{create}) (parent:<name>) (icon:<item>) (title:<text>) (description:<text>) (background:<key>) (frame:<type>) (toast:<boolean>) (announce:<boolean>) (hidden:<boolean>) (x:<offset>) (y:<offset>) (progress_length:<#>) |
| Short Description | Controls a custom advancement. |
| Full Description | Controls custom Minecraft player advancements. You should generally create advancements manually on server start.
Currently, the ID argument may only refer to advancements added through this command. The default action is to create and register a new advancement. You may also delete an existing advancement, in which case do not provide any further arguments. You may grant or revoke an advancement for a list of players, in which case do not provide any further arguments. The parent argument sets the root advancement in the advancements menu, in the format "namespace:key". If no namespace is specified, the parent is assumed to have been created through this command. The icon argument sets the icon displayed in toasts and the advancements menu. As of MC 1.20, an icon is required. Dirt will be used if it is missing. The title argument sets the title that will show on toasts and in the advancements menu. The description argument sets the information that will show when scrolling over a chat announcement or in the advancements menu. The background argument sets the image to use if the advancement goes to a new tab. If the background is unspecified, defaults to "minecraft:gui/advancements/backgrounds/stone". The frame argument sets the type of advancement - valid arguments are CHALLENGE, GOAL, and TASK. The toast argument sets whether the advancement should display a toast message when a player completes it. Default is true. The announce argument sets whether the advancement should display a chat message to the server when a player completes it. Default is true. The hidden argument sets whether the advancement should be hidden until it is completed. The x and y arguments are offsets based on the size of an advancement icon in the menu. They are required for custom tabs to look reasonable. When creating an advancement, optionally specify 'progress_length' to make it require multiple parts. When granting an advancement, optionally specify 'progress_length' to only grant partial progress. To award a pre-existing vanilla advancement, instead use PlayerTag.award_advancement WARNING: Failure to re-create advancements on every server start may result in loss of data - use server prestart. If you mess with datapacks, you will also need to re-create advancements during server resources reloaded |
| Related Tags | <PlayerTag.has_advancement[<advancement>]> Returns whether the player has completed the specified advancement.
<PlayerTag.advancements> Returns a list of the names of all advancements the player has completed.
<server.advancement_types> Returns a list of all registered advancement names. (...)
|
| Usage Example | |
| Usage Example | |
| Usage Example | |
| Group | player |
| Source | https://github.com/DenizenScript/Denizen/blob/dev/plugin/src/main/java/com/denizenscript/denizen/scripts/commands/player/AdvancementCommand.java#L36 |