🎨Customize

Match rules

The plugin uses match rules in order to apply the customization only for the items you want.

Material matching - wildcard

You can use the material_wildcards rule to match items by their material but if they start-end with a word.

For example this matches any item of which its material name ends with _SWORD.

  custom1:
    rules:
      material_wildcards:
        - "*_SWORD"
    changes:
      rename: "Amogus"
      remove_enchants: 
      - DAMAGE_ALL:9
      - PROTECTION_FIRE:9

For example this matches any item of which its material name starts with DIAMOND_*.

  custom1:
    rules:
      material_wildcards:
        - "DIAMOND_*"
    changes:
      rename: "Amogus"
      remove_enchants: 
      - DAMAGE_ALL:9
      - PROTECTION_FIRE:9

Material matching - precise material

You can use the material rule to match items by their material.

For example this matches only STONE items.

  custom1:
    rules:
      material_wildcards:
        - "STONE"
    changes:
      rename: "Amogus"
      remove_enchants: 
      - DAMAGE_ALL:9
      - PROTECTION_FIRE:9

Material matching - regex

You can use material_regex to match material name based on a regex expression.

For example this:

  custom1:
    rules:
      material_regex: "(.*)_STONE"
    changes:
      rename: "Amogus"
      remove_enchants: 
      - DAMAGE_ALL:9
      - PROTECTION_FIRE:9

Vanilla matching

The special property makes the plugin recognize vanilla items. A vanilla item is an item which has no customized lore, no enchants and has no custom display name (note: items renamed with the anvil will be considered vanilla anyway).

  custom9:
    rules:
      material: OAK_LOG
      is_vanilla_item: true
    changes:
      rename: "Amogus"
      remove_enchants: 
      - DAMAGE_ALL:9
      - PROTECTION_FIRE:9

NBT matching

You can match NBT attributes. In this example I match the ItemsAdder plugin NBT tag.

  custom6:
    rules:
      nbt:
        path: "itemsadder.id"
        value: ruby
        type: string
    changes:
      replace_word_display_name:
        from: "Ruby"
        to: "FOUND NBT RULE!"

Rarity

You can match the vanilla rarity attribute.

  epic_tag:
    rules:
      rarity: EPIC
    changes:
      lore_insert_json:
        index: 0
        lines:
        - '[{"text":"3", "font":"vanilla_customizer:rarity"}]'

Placeable

Matches if the item is a placeable (for example a block).

  placeable:
    enabled: true
    rules:
      placeable: true

Placeable hardness

Matches if the item has hardness greater than X, in this example 0. The {hardness} text is a special placeholder and will be automatically replaced with the hardness value in any change rule.

  placeable_hardness_indicator:
    enabled: true
    rules:
      placeable: true
      is_vanilla_item: true
      hardness_greater_than: 0.0
    changes:
      lore_insert_json:
        index: 100
        lines:
        - '[{"text":"à", "font":"simple_vanilla_enhancer:tags"}, {"text": "{hardness}", "color": "gray", "font":"default"}]'

Edible

Matches if the item is a food.

  food:
    rules:
      is_vanilla_item: true
      edible: true

Smelted

Matches if the item was smelted in order to be crafted, for example Iron Ingot.

  smelted:
    enabled: true
    rules:
      smelted: true

Changes

The plugin allows you to customize items using some customization properties. These customizations are triggered only if the previous matching rules are satisfied for a particular item.

Here is a list of all possible changes for an item and all their properties.

    changes:
    
      rename: "Amogus"
      
      rename_json: '["",{"text":"Welco"},{"text":"me t","color":"dark_red"},{"text":"o "},{"text":"Minecraft Tools","color":"green"}]'
      
      remove_enchants: 
      - DAMAGE_ALL:9
      - PROTECTION_FIRE:9
      ## .... more enchants here
      
      durability: 0
      
      replace_word_display_name:
        from: "test"
        to: "changed_text!!!"
        
      lore_set:
        - '&6line1'
        - 'line2'
        ## .... more lore lines here
      
      
      lore_set_json:
        - '["",{"text":"qqqqqq"},{"text":"me t","color":"dark_red"},{"text":"o "},{"text":"Minecraft Tools","color":"green"}]'
        - '["",{"text":"Welco"},{"text":"me t","color":"dark_red"},{"text":"o "},{"text":"Minecraft Tools","color":"green"}]'
        ## .... more lore lines here
      
      lore_insert:
        index: 0
        lines:
        - '&6line1'
        - 'line2'
        ## .... more lore lines here
        
      lore_insert_json:
        index: 0
        lines:
        - '[{"text":"a", "font":"vanilla_customizer:tags"}]'
        ## .... more lore lines here
      
      replace_word_lore:
        from: "Blocked"
        to: "&6THESE ARE BLOCKED ENCHANTS!"
      
      custom_model_data: 666
      
      add_enchants: 
      - PROTECTION_FIRE:9
      
      remove_enchants: 
      - DAMAGE_ALL:9
      - PROTECTION_FIRE:9
      
      add_attributes: 
        attack_speed:
          uuid: "0e9b65dd-3dce-4a3f-8a13-3299a91ceac7"
          name: "amogus"
          operation: multiply_base
          amount: 666
          slot: offhand
          attribute: "generic.attack_speed"
          ## .... more attributes here
      
      flags:
      - HIDE_ATTRIBUTES
      ## .... more flagshere
      
      material: STONE
      
      custom_model_data: 1337
      
      # Special property which hides the NBT of the item.
      protect_nbt_data: true

Last updated