Skip to content

Item Profiles

byteful edited this page Jul 16, 2026 · 3 revisions

Item Profiles (item_profiles.yml)

Item profiles define which items can level up and link them to trigger, reward, and display profiles.

File Location

plugins/LevelTools/item_profiles.yml

Structure

profiles:
  profile_id:
    materials:
      - DIAMOND_PICKAXE
      - IRON_PICKAXE
    trigger_profiles: # XP from all matching profiles is combined into one gain
      - block_mining
    reward_profile: tools
    display_profile: default
    max_level: 100
    level_xp_formula: "100 + {current_level} * 100" # Optional

Options

Option Description Required
materials List of item materials Yes
trigger_profiles List of IDs from trigger_profiles.yml. If several profiles match the same action, their XP is added together and granted as a single XP gain. A deprecated singular trigger_profile form exists in code but is not the supported usage. Yes (at least one)
reward_profile ID from reward_profiles.yml Yes
display_profile ID from display_profiles.yml Yes
max_level Maximum level for these items No (defaults to 100, or inherited via extends)
level_xp_formula Override configured global and permission XP formulas No
extends Inherit from another profile No

Material Restriction

Each material can only belong to ONE item profile. If the same material appears in multiple profiles, LevelTools will fail to load and log an error.

# This will cause an error:
pickaxes:
  materials:
    - DIAMOND_PICKAXE  # Duplicate!

special_pickaxes:
  materials:
    - DIAMOND_PICKAXE  # Error: already in pickaxes profile

Default Profiles

pickaxes

pickaxes:
  materials:
    - WOODEN_PICKAXE
    - STONE_PICKAXE
    - IRON_PICKAXE
    - GOLDEN_PICKAXE
    - DIAMOND_PICKAXE
    - NETHERITE_PICKAXE
  trigger_profiles: 
    - block_mining
  reward_profile: tools
  display_profile: default
  max_level: 100

axes

axes:
  materials:
    - WOODEN_AXE
    - STONE_AXE
    - IRON_AXE
    - GOLDEN_AXE
    - DIAMOND_AXE
    - NETHERITE_AXE
  trigger_profiles: 
    - block_mining
  reward_profile: tools
  display_profile: default
  max_level: 100

shovels

shovels:
  materials:
    - WOODEN_SHOVEL
    - STONE_SHOVEL
    - IRON_SHOVEL
    - GOLDEN_SHOVEL
    - DIAMOND_SHOVEL
    - NETHERITE_SHOVEL
  trigger_profiles: 
    - block_mining
  reward_profile: tools
  display_profile: default
  max_level: 100

swords

swords:
  materials:
    - WOODEN_SWORD
    - STONE_SWORD
    - IRON_SWORD
    - GOLDEN_SWORD
    - DIAMOND_SWORD
    - NETHERITE_SWORD
  trigger_profiles: 
    - combat
  reward_profile: swords
  display_profile: default
  max_level: 100

bows

bows:
  materials:
    - BOW
  trigger_profiles: 
    - combat
  reward_profile: bows
  display_profile: default
  max_level: 100

crossbows

crossbows:
  materials:
    - CROSSBOW
  trigger_profiles:
    - combat
  reward_profile: crossbows
  display_profile: default
  max_level: 100

fishing_rods

fishing_rods:
  materials:
    - FISHING_ROD
  trigger_profiles: 
    - fishing
  reward_profile: fishing_rods
  display_profile: default
  max_level: 100

tridents

tridents:
  materials:
    - TRIDENT
  trigger_profiles:
    - combat
  reward_profile: tridents
  display_profile: default
  max_level: 100

hoes

hoes:
  materials:
    - WOODEN_HOE
    - STONE_HOE
    - IRON_HOE
    - GOLDEN_HOE
    - DIAMOND_HOE
    - NETHERITE_HOE
  trigger_profiles:
    - farming
  reward_profile: hoes
  display_profile: default
  max_level: 100

Profile Inheritance

Use extends to inherit settings from another profile, then override specific options.

profiles:
  pickaxes:
    materials:
      - WOODEN_PICKAXE
      - STONE_PICKAXE
      - IRON_PICKAXE
      - GOLDEN_PICKAXE
      - DIAMOND_PICKAXE
    trigger_profiles: 
      - block_mining
    reward_profile: tools
    display_profile: default
    max_level: 100

  netherite_pickaxes:
    extends: pickaxes
    materials:
      - NETHERITE_PICKAXE
    max_level: 150  # Override max level

The netherite_pickaxes profile inherits trigger_profiles, reward_profile, and display_profile from pickaxes, but has its own materials and max level.

Custom XP Formula

Override configured xp_formulas for specific item types:

legendary_swords:
  materials:
    - NETHERITE_SWORD
  trigger_profiles: 
    - combat
  reward_profile: swords
  display_profile: default
  max_level: 200
  level_xp_formula: "500 + {current_level} * 250"  # Harder to level

Item profile formulas take priority over both the global formula and permission-selected formulas from config.yml.

Formula priority:

  1. This profile's level_xp_formula
  2. First matching leveltools.formula.<id> permission formula from config.yml
  3. xp_formulas.global

If a parent profile has level_xp_formula, child profiles inherit it unless they define their own.

Like the formulas in config.yml, level_xp_formula must return a positive value for every level from 0 to 1000. Profiles with an invalid formula are rejected with an error when profiles load.

Creating Custom Profiles

Example: Shears

First, create a trigger profile in trigger_profiles.yml:

profiles:
  shearing:
    type: BLOCK_BREAK
    xp_modifier:
      default:
        min: 1.0
        max: 2.0
    filter:
      type: WHITELIST
      list:
        - "GRASS"
        - "TALL_GRASS"
        - "FERN"
        - "LARGE_FERN"
        - "COBWEB"
        - "OAK_LEAVES"

Then create a reward profile in reward_profiles.yml:

profiles:
  shears:
    levels:
      5:
        - "enchant2 efficiency 1"
      10:
        - "enchant2 fortune 1"
      20:
        - "enchant2 efficiency 3"
      30:
        - "enchant2 fortune 2"

Finally, add the item profile in item_profiles.yml:

profiles:
  shears:
    materials:
      - SHEARS
    trigger_profiles:
      - shearing
    reward_profile: shears
    display_profile: default
    max_level: 50

Example: Shields

profiles:
  shields:
    materials:
      - SHIELD
    trigger_profiles:
      - right_click  # define a custom RIGHT_CLICK trigger profile in trigger_profiles.yml
    reward_profile: shields
    display_profile: default
    max_level: 30

Reference Links

Clone this wiki locally