Skip to main content

Custom Item Examples

Custom items are the foundation of player interaction with your skill systems. These examples show how to create reusable item templates and practical implementations.

Item Templates

Templates provide reusable configurations that can be extended by specific items.

Base Weapon Templates

Foundation templates that define common weapon properties.

Universal Weapon Template

weapon:
  Options:
    PreventDropping: false
    KeepOnDeath: false
    Unbreakable: true
    Placeable: false
  Hide:
    - UNBREAKABLE
    - DYE
Options:
  • PreventDropping: false: Players can drop the item
  • KeepOnDeath: false: Item drops on death
  • Unbreakable: true: Never breaks from use
  • Placeable: false: Cannot be placed as block
Hide:
  • UNBREAKABLE: Hides the unbreakable tooltip
  • DYE: Hides leather armor color info

Weapon Type Templates

melee:
  Template: weapon
  Id: GOLDEN_SWORD

bow:
  Template: weapon
  Id: BOW

wand:
  Template: weapon
  Id: STICK
These inherit all properties from the weapon template and specify the base material.

Using Templates

fire_sword:
  Template: melee
  Display: "<#FF6B6B>Blazing Sword"
  Lore:
  - "&7Burns enemies on hit"
  Skills:
  - ignite{t=60} @Target ~onAttack
Inherits from melee, which inherits from weapon.

Practical Implementations

Apprentice Wand

A practical implementation using the quick click combo template.
apprentice_wand:
  Id: BLAZE_ROD
  Template: click_combo-quick
  Display: 'Apprentice Wand'
  Lore: "Quick Varient"
  Skills:
  - skill{s=frost_shard-cast;delay=1} @self ~onSwing ?!hasaura{aura=clickcombo-input}
  - skill{s=click_combo;type=QUICK;
    duration=10;debug=false;
    SWAPL=burning_blast-cast;
    SWAPR=flame_flicker-cast;
    SWAPDROP=spark_jolt-cast;
    SWAPSWAP=glacial_spikes-cast;
    SWAPL+DOWN=void_lance-cast;
    SWAPR+DOWN=[];
    SWAPDROP+DOWN=[];
    SWAPSWAP+DOWN=[]} @self ~onPressF
Basic Attack:
- skill{s=frost_shard-cast;delay=1} @self ~onSwing ?!hasaura{aura=clickcombo-input}
Left-click casts frost_shard-cast when not in combo mode.Combo Spells:
- skill{s=click_combo;type=QUICK;
  duration=10;debug=false;
  SWAPL=burning_blast-cast;
  SWAPR=flame_flicker-cast;
  SWAPDROP=spark_jolt-cast;
  SWAPSWAP=glacial_spikes-cast;
  SWAPL+DOWN=void_lance-cast;
  SWAPR+DOWN=[];
  SWAPDROP+DOWN=[];
  SWAPSWAP+DOWN=[]} @self ~onPressF
  • duration=10: 10 seconds to complete combo
  • SWAPL: Swap + Left Click
  • SWAPR: Swap + Right Click
  • SWAPDROP: Swap + Drop (Q)
  • SWAPSWAP: Swap + Swap (double F)
  • SWAPL+DOWN: Swap + Left while crouching

How to Use

  1. Basic Attack: Left-click to cast Frost Shard
  2. Combo Attack: Press F, then:
    • Left-click for Burning Blast
    • Right-click for Flame Flicker
    • Drop (Q) for Spark Jolt
    • F again for Glacial Spikes
    • Crouch + Left for Void Lance

Item System Integration

Template Inheritance

Items can inherit from multiple levels:
# Level 1: Base
weapon:
  Options:
    Unbreakable: true

# Level 2: Type
melee:
  Template: weapon
  Id: GOLDEN_SWORD

# Level 3: Specific
flame_sword:
  Template: melee
  Display: "Flame Sword"
  Skills:
  - ignite{t=60} @Target ~onAttack

NBT Data Management

NBT data can store persistent information:
Custom Item:
  NBT:
    # Integers
    level: int/1
    experience: int/0
    
    # Floats
    damage_multiplier: float/1.5
    
    # Strings
    owner: "PlayerName"
    
    # Nested structures
    stats:
      strength: int/10
      agility: int/8
Access in skills:
- damage{a="<caster.item.hand.nbt.stats.strength>*2"}

Item Triggers

Common trigger events:
Skills:
  - skill{} @self ~onAttack        # When attacking entity
  - skill{} @self ~onHit           # When hit by entity  
  - skill{} @self ~onSwing         # When left-clicking
  - skill{} @self ~onUse           # When right-clicking
  - skill{} @self ~onBowHit        # When arrow hits
  - skill{} @self ~onHold          # While holding item
  - skill{} @self ~onUnHeld        # When switching away
  - skill{} @self ~onDropitem      # When dropping
  - skill{} @self ~onPressF        # When pressing F
  - skill{} @self ~onPressQ        # When pressing Q

Source Files

weapon:
  Options:
    PreventDropping: false
    KeepOnDeath: false
    Unbreakable: true
    Placeable: false
  Hide:
    - UNBREAKABLE
    - DYE

melee:
  Template: weapon
  Id: GOLDEN_SWORD

bow:
  Template: weapon
  Id: BOW

wand:
  Template: weapon
  Id: STICK

cyclewand:
  Template: weapon
  Id: STICK
  Display: "Base Cycle Wand"
  NBT:
    activespell: int/1
    maxspells: int/3
  Skills:
    - skill{s=spell-cycle-cast;branch=true} @self ~onSwing
    - skill{s=spell-cycle-right;branch=true} @self ~onUse ?!isCrouching
    - skill{s=spell-cycle-left;branch=true} @self ~onUse ?isCrouching

click_combo-normal:
  Template: weapon
  Id: STICK
  Display: "Normal Click Combo"
  Lore: "RIGHT-CLICK to Cast spells."
  Slot: HAND
  Options:
    PreventDropping: true
  Skills:
  - skill{s=[ 
    - aura{name=clickcombo-left_cd;d=2;ow=true;bartimer=false} 
    - skill{s=click_combo-sendinput;key=DROP} 
    ]} @self ~onDropitem 
  - skill{s=[ - skill{s=click_combo-sendinput;key=LEFT;delay=2} ]} @self ~onSwing ?!hasaura{aura=clickcombo-left_cd}
  - skill{s=[ - skill{s=click_combo-sendinput;key=RIGHT} ]} @self ~onUse

  - CancelEvent{sync=true} @self ~onPressF
  - skill{s=click_combo-sendinput;key=SWAP} @self ~onPressF
  - skill{s=click_combo-force_end} @self ~onUnHeld

click_combo-quick:
  Template: weapon
  Id: STICK
  Display: "Quick Click Combo"
  Lore: "SWAP to Quick-cast spells."
  Slot: HAND
  Options:
    PreventDropping: true
  Hide:
    - UNBREAKABLE
    - DYE
  Skills:
  - skill{s=[ 
    - aura{name=clickcombo-left_cd;d=2;ma=true;bartimer=false} 
    - skill{s=click_combo-sendinput;key=DROP} ]} 
    @self ~onDropitem 
  - CancelEvent{sync=true} @self ~onPressF
  - skill{s=click_combo-sendinput;key=SWAP} @self ~onPressF
  - skill{s=click_combo-force_end} @self ~onUnHeld
  - skill{s=click_combo-sendinput;key=LEFT;delay=2} @self ~onSwing ?!hasaura{aura=clickcombo-left_cd}
  - skill{s=click_combo-sendinput;key=RIGHT} @self ~onUse

click_combo-wynn:
  Template: weapon
  Id: STICK
  Display: "Wynn Wand Click Combo"
  Lore: "RIGHT-CLICK to Cast spells."
  Slot: HAND
  Options:
    PreventDropping: true
  Hide:
    - UNBREAKABLE
    - DYE
  Skills:
    - skill{s=[ - skill{s=click_combo-sendinput;key=LEFT;delay=0} ]} @self ~onSwing
    - skill{s=[ - skill{s=click_combo-sendinput;key=RIGHT;delay=0} ]} @self ~onUse
    - skill{s=click_combo-force_end} @self ~onUnHeld

Next Steps

Demo Spells

Create spells to use with your items

Weapon Combos

Add combo systems to weapons

Items API Reference

Deep dive into item configuration

Spell Cycling

Master NBT data management with spell cycling

Build docs developers (and LLMs) love