Fake/Real changes

You can use change rules at both fake-changes and real-changes option.

The rule with an * symbol indicates that the item will be replaced, the original item will disappear, and then the new item will replace the original item.

When using these rules, please be sure to note that the replaced item can no longer meet this rule, otherwise the item will be constantly replaced, causing a dead loop and ultimately causing the server to crash!

fake-changes:
  add-name-first: '&fGood '
  set-name: '&fGood Diamond Sword'
  add-lore-last:
    - '&f&lCommon'
  set-lore:
    - '&7A good sword that all adventures should use!'
    - '&f&lCommon'
  add-lore-prefix: '%img_tooltip1%'
  set-custom-model-data: 5
  add-flags:
    - 'HIDE_ENCHANTS'

real-changes:
  add-enchants:
    POWER: 1
  remove-enchants:
    - 'POWER'
  remove-all-enchants: true
  replace-item:
    material: golden_sword

Add name first/Add name last

Add new content to the left or right of the custom display name of the item.

Do not use this in real change, otherwise your item will have lore dupe.

fake-changes:
  add-name-first: '&fGood '
  add-name-last: ' &d(New)'

Set name/Set Lore

Set custom display names or lore for items.

fake-changes:
  set-name: '&fGood Diamond Sword'
  set-lore:
    - '&7A good sword that all adventures should use!'
    - '&f&lCommon'

Add lore first/Add lore last

Add content at the beginning or end of the item Lore.

fake-changes:
  add-lore-first:
    - '&7A very very old sword!'
  add-lore-last:
    - '&f&lCommon'

Adding content before or after each line in Lore and this is very useful for users who want to add a Tooltip icon.

fake-changes:
  add-lore-prefix: '%img_tooltip1%'
  add-lore-suffix: 'This is end of the line'

Set Custom Model Data

Setting the Custom Model Data for an item and this is very useful for users who want to add skins to the item.

fake-changes:
  set-custom-model-data: 5

Add flag/Remove flag

Flag ID list:

https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/inventory/ItemFlag.html

fake-changes:
  add-flags:
    - 'HIDE_ENCHANTS'
  remove-flags:
    - 'HIDE_DYE'

Add enchants

Use spigot's enchantment ID!!!

Add enchantments to items. Please note that in general, you should use it in real changes. If you use it in fake-changes, the enchantment will actually take effect, but it appears to disappear.

real-changes:
  add-enchants:
    POWER: 1

Delete enchants

Delete the enchantment on the item, please note that the number after the enchantment represents the effective value. If the enchantment level of an item is greater than this value (excluding this value), the enchantment will be deleted.

In this example, items with Knockback I enchantment will not be affected, while items with Knockback II enchantment will be deleted.

real-changes:
  delete-enchants:
    KNOCKBACK: 1

If you want to make only specified enchantment level take effect, you can use int list at here. For example, I want to make only item has Knockback level 1 enchantment match, then you should set this section like this:

real-changes:
  delete-enchants:
    KNOCKBACK: [1] # Added = symbol before the value.
    OTHERS: [1,2,5] # Means level1, 2 and 5.

Remove Enchants

Similar to delete-enchants but ignore the enchantment levels.

real-changes:
  remove-enchants:
    - 'KNOCKBACK'

Remove all enchantments

real-changes:
  remove-all-enchants: true

Replace new item*

Use the ItemFormat here.

You need use this both in fake-changes and real-changes option to make it working well.

The data of the original item will be lost. You can consider using rules starting with keep to convert some of the data from the original item to the new item (this will cause some additional performance consumption).

fake-changes:
  replace-item:
    hook-plugin: MMOItems
    hook-item: 'MATERIAL;;REAR_INGOT'
real-changes:
  replace-item:
    hook-plugin: MMOItems
    hook-item: 'MATERIAL;;REAR_INGOT'

Set Type

Set item's type to other material.

real-changes:
  set-type: STONE

Replace Lore

Replace specific content to other value in item's lore. Support use \n means start a new line.

fake-changes:
  replace-lore:
    'Click to': 'Click \nto'

Fix Hide Attributes Bug

Hide Attribute item flag has bug in 1.20.6 higher version, this rule can try fix the items that the hide attribute do not work.

fake-changes:
  fix-hide-attributes: true

Replace Enchants - Premium

real-changes:
  replace-enchants:
    knockback: power

Set Color - Premium

Set leather armor color to new color.

fake-changes:
  set-color: 'ff0000'

Parse PAPI - Premium

Require PlaceholderAPI. Other change rule related to name and lore contains this feature, so you don't need use this rule twice.

Support parse-papi-name and parse-papi-lore.

fake-changes:
  parse-papi-name: true

Add NBT - Premium

Require NBTAPI, download it here.

Support add-nbt-string, add-nbt-int, add-nbt-double, add-nbt-byte change rule.

Use ;; distinguish key value hierarchy.

The value after the last ;; symbol represents the NBT value.

real-changes:
  add-nbt-int:
    - 'test;;5'
  add-nbt-string:
    # Key;;Value
    - 'test;;t'

Remove NBT - Premium

Require NBTAPI, download it here.

Use ;; distinguish key value hierarchy.

real-changes:
  remove-nbt:
    - 'fff;;fff'

Edit Item - Premium

Edit the item by Item Format.

Some change rule can be done by Item Format, for example:

For set name rule:

fake-changes:
  set-name: 'test1'

can be replaced to:

fake-changes:
  edit-item:
    name: 'test1'

View Item Format here.

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: true

Edit Lore - Premium

Edit specifed line's lore. Format is line number (or last to mean the last line): The modified lore text (support use {original} to mean the original lore line text).

fake-changes:
  edit-lore:
    30: 'test'
    last: '&f{original} hello!
  edit-lore-bypass: false

In this example, we set item's lore value to test in line 30, however, if this item don't have 30 lines, we will only try add new line for this item. If you don't want this and just want us ignore the exceeding line, please use edit-lore-bypass option.

Last updated