Creating Items
Creating Items
Learn how to create custom items with zItems, from simple sticks to complex tools with effects, metadata, and recipes.
Quick Start
Your First Item
Create a file items/my_stick.yml:
id: "my_stick"
material: STICK
display-name: "<aqua>My Custom Stick</aqua>"
lore:
- "<gray>My first custom item!"Reload and test:
/zitems reload
/zitems item give <player-name> my_stickThat's it! You've created your first custom item.
File Structure
Items Directory
All item files go in plugins/zItems/items/:
Subdirectories are supported - organize items however you like!
File Naming
Use snake_case:
hammer_pickaxe.yml✅Avoid spaces:
hammer pickaxe.yml❌Be descriptive:
tool1.ymlvsfarming_hoe.yml✅
Basic Configuration
Required Fields
Every item needs these fields:
id
Unique identifier for this item.
Rules:
Must be unique across all items
Use snake_case
Only letters, numbers, underscore
No spaces
Examples:
material
Bukkit Material enum value.
Examples:
Find materials: Bukkit Materials
display-name
Item name shown to players, using MiniMessage format.
Examples:
MiniMessage docs: Adventure MiniMessage
Optional Fields
lore
List of lore lines displayed under the item name.
Tips:
Use
""for empty linesKeep lines short (< 40 characters)
Use colors for organization
custom-model-data
Custom model data value for resource packs.
Use case: Custom textures/models via resource pack.
max-stack-size
Maximum stack size (1-99).
max-damage
Maximum durability (for tools/weapons).
Note: Requires unbreakable: false.
unbreakable
Make item unbreakable (infinite durability).
hide-tooltip
Hide all tooltip information (enchants, attributes, etc.).
trackable
Enable block tracking (for custom blocks).
Use case: Custom blocks that should drop the custom item when broken.
See: Block Tracking
Enchantments
Add vanilla enchantments to items:
Format
Enchantment types: Bukkit Enchantment
Examples
Attributes
Add vanilla attributes (armor, attack damage, etc.):
Format
Attribute types:
armor- Armor pointsarmor_toughness- Armor toughnessattack_damage- Attack damageattack_speed- Attack speedknockback_resistance- Knockback resistancemax_health- Max healthmovement_speed- Movement speedluck- Luck
Operations:
ADD_NUMBER- Add amount (e.g., +10 armor)ADD_SCALAR- Add percentage (e.g., +50% = 0.5)MULTIPLY_SCALAR_1- Multiply by (1 + amount)
Slots (optional):
HAND,OFF_HANDHEAD,CHEST,LEGS,FEET
Attribute Merge Strategy
Control how custom attributes merge with default item attributes:
Strategies:
REPLACE- Replace all existing attributes (default)ADD- Keep existing + add new (may create duplicates)KEEP_HIGHEST- Keep highest value for each attributeKEEP_LOWEST- Keep lowest value for each attributeSUM- Sum values for each attribute
Example:
Examples
Effects
Apply custom effects to items:
Effects are effect IDs defined in effects/ directory.
See: Effects System
Effect Display Control
Control how effects appear in lore:
See: Effect Lore Display
Metadata System
Add special functionality using metadata:
Available metadata types:
food- Food propertiespotion- Potion effects and colorleather-armor- Leather armor colortrim- Armor trimsbanner- Banner patternsenchant-storage- Stored enchantments (for books)
See: Metadata System
Recipes
Add crafting recipes for your items:
Recipe Types
Shaped Crafting
Pattern:
3x3 grid
Use any character for ingredients
Space = empty slot
Shapeless Crafting
Order doesn't matter - just put ingredients anywhere.
Smelting
Smithing
Ingredient Types
Common tags:
logs- All log typesplanks- All plank typesstone_tool_materials- Cobblestone, blackstone, etc.wooden_slabs- All wooden slabs
Recipe Examples
Complete Examples
Simple Stick
Hammer Pickaxe
Auto-Sell Pickaxe with Recipe
Golden Apple with Food Metadata
Trimmed Netherite Armor
Hidden Additional Effects
Usage:
Advanced Topics
Custom Model Data
Use resource packs for custom textures:
How it works:
Create resource pack with custom model
Assign model to custom model data value
Set value in item YAML
Item displays with custom texture
Resource pack tutorial: Minecraft Model Guide
Trackable Blocks
For custom blocks that should drop the custom item:
How it works:
Player places
ruby_oreitem as a blockBlockTracker remembers: "This block is
ruby_ore"Player breaks it (or uses Hammer/Vein Mining)
Drops
ruby_oreitem instead ofSTONE
See: Block Tracking
Effect Restrictions
Control which effects can be added:
Use case: Prevent overpowered combinations.
Testing Your Items
Step 1: Create Item File
items/my_pickaxe.yml:
Step 2: Reload
Check console:
Step 3: Give Item
Or:
Step 4: Test
Check display name
Check lore
Test enchantments
Test effects
Test recipe (if applicable)
Step 5: Iterate
Edit YAML → /zitems reload → Test again
Common Issues
Item not loading
Symptoms:
/zitems item givesays "Item not found"Console shows no "Registered item: X"
Checklist:
Is file in
plugins/zItems/items/(or subdirectory)?Is file named
.yml?Are required fields present (
id,material,display-name)?Is YAML syntax valid? (Check for indentation errors)
Debug:
YAML syntax error
Error:
Common causes:
Inconsistent indentation (use spaces, not tabs)
Missing quotes around special characters
Unclosed strings
Example fix:
Recipe not working
Symptoms:
Crafting doesn't work
Recipe not shown in recipe book
Checklist:
Is
recipe:block present?Is
typevalid? (CRAFTING_SHAPED,CRAFTING_SHAPELESS, etc.)Do ingredient materials exist?
For shaped: Is pattern valid? (Max 3x3)
Debug: Enable debug mode and check:
Effects not applying
Symptoms:
Item has effects in config
Effects don't work in-game
Checklist:
Do effect files exist in
effects/?Are effect IDs correct?
Does effect's
can-apply-toallow this material?
Test:
If this works, the effect is fine. Check item config.
Best Practices
Use descriptive IDs -
hammer_pickaxenotitem1Organize with subdirectories -
tools/,weapons/,armor/Keep lore concise - Max 3-5 lines
Test after changes -
/zitems reloadis fast!Use MiniMessage formatting - More powerful than legacy codes
Document complex items - Add comments in YAML
Balance effects - Don't make items too overpowered
Use recipes - Make items craftable for survival
Consistent naming - Use a naming convention and stick to it
Version control - Use git for your items directory!
Next Steps
Now that you can create items:
Effects System - Add powerful effects to items
Effect Handlers Reference - All available effects
Metadata System - Food, potions, trims, etc.
Effect Lore Display - Customize effect display
Need help? Join our Discord or check GitHub Issues!
Last updated