Match Item

Items

match-item:
  # Type item ID here, support third item plugins item ID.
  items:
    - 'diamond_sword'
    - 'superior_sword'
  use-tier-identify: true

For MMOItems, there is also a use-tier-identity option available, which represents whether to use item ID or item quality. If changed to true, you can use quality IDs such as RARE here instead of the previous item ID.

Has name

Whether only items with custom display names will match.

match-item:
  has-name: true

Has lore

Whether only items with lores will match.

match-item:
  has-lore: true

Contains Name/Contains Lore

match-item:
  contains-lore:
    - 'test1'
  contains-name:
    - 'test1'

Has Enchants

match-item:
  has-enchants:
    - 'POWER'

Contains Enchants - Premium

Similar to has-enchants, but require the enchantment level must be greater than the value you set.

match-item:
  contains-enchants:
    POWER: 1

Contains specified levels enchants - Premium

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 Power level 1 enchantment match, then you should set this section like this:

match-item:
  contains-enchants:
    POWER: [1] # Added = symbol before the value.
    OTHER: [1,2,5] # Means level1, 2 and 5.

Material - Premium

Require item material must be the value of this list. This is very similar to items rule, but this rule will only use vanilla item material type.

match-item:
  material:
    - 'diamond'
    - 'diamond_sword'

Rarity (1.20.5+) - Premium

Require item must have specified rarity. Rarity require you extra set in item, by default all items don't have rarity, for item don't have custom rarity, plugin will use "NONE" as result.

match-item:
  rarity: NONE

Contains NBT - Premium

Require NBTAPI, download it here.

Use ;; distinguish key value hierarchy.

match-item:
  contains-nbt: 
    - 'PublicBukkitValues;;mythicchanger:apply_item_id'

NBT String - Premium

Require NBTAPI, download it here.

Require specifed NBT type must be STRING.

Use ;; distinguish key value hierarchy.

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

match-item:
  # Require this NBT value to be A.
  nbt-string:
    - 'PublicBukkitValues;;mythicchanger:apply_item_id;;A'

NBT Int/NBT Double/NBT Byte - Premium

Require NBTAPI, download it here.

Similar to NBT String, but should has comparison symbols.

Comparsion symbols support:

  • >=

  • <=

  • >

  • <

  • ==

match-item:
  nbt-double:
    - 'PublicBukkitValues;;mythicchanger:test;;>=;;5'

NOT - Premium

If item didn't meet the match rule you set in NOT section, we will consider this rule as meet the rule.

Never use this with replace-item change rule!

match-item:
  not:
    items:
      - 'diamond_sword'

ANY - Premium

If item meet any of those match item rules, we will consider it meet the rule.

match-item:
  any:
    rarity: COMMON
    material:
      - 'diamond'

Item Format - Premium

Require item's item format specifed key's value must same as the value set here.

match-item:
  item-format:
    material: diamond
    custom-model-data: 50

This means only diamond item with custom model data 50 will meet. You can hold the item and use command /mc generateitemformat to generate item format at the plugin (plugins/MythicChanger) folder.

Last updated