-
Notifications
You must be signed in to change notification settings - Fork 35
Item Formatting
When you create and save a quest, Quests remembers this in one of two ways.
Here is an example of Quests saving the data from a quest Stage in a list.
break-block-names:
- stone
break-block-amounts:
- 10
The name can be nearly any Material name from this page, except for a select few. For example, WOOD_DOOR will not work as it refers to the item, not the block (use WOODEN_DOOR for this).
In this method of saving, there is no further configuration available.
Here is an example of Quests saving the data from a quest Reward in an ItemStack.
items:
- name-DIAMOND_SWORD:amount-1:enchantment-Sharpness 3:enchantment-Looting 2:displayname-Eviscerator:lore-It is said that this sword is:lore-so sharp that it can cut through:lore-obsidian.
While this may look daunting, it is easier to read when broken down. Each part is made of a key and a value, all of which are separated by colons (':').
The first key/value pair describes the item name, designated by the leading "name-" key. The value is "DIAMOND_SWORD", which, as you might have guessed, informs Quests that this item is a Diamond Sword. Next we have the "amount-" of items involved in this ItemStack, followed by any enchantments placed on the it. The "displayname-" is the same as what you would get if you renamed an item with a Name Tag - just a custom name for the item. Finally, any lore associated with the item is saved with each "lore-" key representing a new line of lore.
You may also see a "data-" key on some items. This is also known as the damage value and is used throughout Quests (and Minecraft) to determine the variation of an item. For example, a data value 1 on Coal will give Charcoal instead, because Charcoal is just Coal with a damage value of 1. It may also be used to state the amount of damage to a weapon or tool (hence the aka, damage value). Here's an example:
items:
- name-DIRT:amount-3:data-2:displayname-Spectacular Dirt:lore-Top notch topsoil!