Keep
Keep - Premium
If a rule with the * symbol is used, the original item will disappear and a new item will replace the original item. Therefore, the data of the original item will disappear. If you want to retain some information about the original item, you need to use the rules here.
Support keep-enchants, keep-name, keep-lore, keep-item-name, keep-flag, keep-damage change rule.
fake-changes:
keep-enchants: true
keep-name: true
keep-lore: true
keep-item-name: true
keep-flag: true
keep-damage: trueKeep is a standard change rule, not a option inside ItemFormat, for example:
fake-changes:
keep-enchants: true
replace-item:
# keep-enchants: true <--- This is wrong! Put keep rules here will not work!
hook-plugin: MMOItems
hook-item: 'MATERIAL;;REAR_INGOT'Keep Item Format
You can copy the item format of the original item to a new item and enter the key value of the item format to be copied in this rule. For example:
You can parse hold item to ItemFormat by using /mc generateitemformat command. You can distinguish the hierarchical relationship of YAML through the . symbol.
In above example, if you just enter 'enchants' in the rule, we will copy all content below enchants, you can also use 'enchants.sharpness' if you just want to copy sharpness enchant. The . symbol between 'enchants' and 'sharpness' represents their hierarchical relationship.
Last updated