Crafting Recipes
CocoVouchers allows you to create custom crafting recipes for vouchers, enabling players to craft vouchers themselves.
Basic Setup
Enable crafting in your voucher configuration:
crafting:
enabled: true
output-amount: 1
permission: "cocovouchers.craft.myvoucher"
shape:
- "DED"
- "EGE"
- "DED"
ingredients:
D: "DIAMOND"
E: "EMERALD"
G: "GOLD_BLOCK"
Configuration Options
enabled
Toggle crafting on/off for this voucher.
crafting:
enabled: true
output-amount
How many vouchers the recipe produces.
crafting:
output-amount: 1 # 1-64
permission
Optional permission required to craft.
crafting:
permission: "cocovouchers.craft.vip_crate"
Leave empty or remove for no permission check:
crafting:
permission: ""
shape
The 3x3 crafting grid pattern using letters.
crafting:
shape:
- "ABC"
- "DEF"
- "GHI"
Grid Layout:
┌───┬───┬───┐
│ A │ B │ C │
├───┼───┼───┤
│ D │ E │ F │
├───┼───┼───┤
│ G │ H │ I │
└───┴───┴───┘
Use spaces for empty slots:
shape:
- "D D"
- " G "
- "D D"
ingredients
Map letters to materials.
crafting:
ingredients:
D: "DIAMOND"
G: "GOLD_BLOCK"
Use AIR for explicitly empty slots (optional):
crafting:
ingredients:
A: "DIAMOND"
B: "AIR"
Recipe Examples
Diamond Voucher
crafting:
enabled: true
output-amount: 1
permission: ""
shape:
- "DDD"
- "DND"
- "DDD"
ingredients:
D: "DIAMOND"
N: "NETHER_STAR"
Visual:
┌─────────┬─────────┬─────────┐
│ DIAMOND │ DIAMOND │ DIAMOND │
├─────────┼─────────┼─────────┤
│ DIAMOND │ STAR │ DIAMOND │
├─────────┼─────────┼─────────┤
│ DIAMOND │ DIAMOND │ DIAMOND │
└─────────┴─────────┴─────────┘
VIP Crate
crafting:
enabled: true
output-amount: 1
permission: "cocovouchers.craft.vip"
shape:
- "EGE"
- "GDG"
- "EGE"
ingredients:
E: "EMERALD_BLOCK"
G: "GOLD_BLOCK"
D: "DIAMOND_BLOCK"
Simple 2x2 Pattern
crafting:
enabled: true
output-amount: 4
shape:
- "DD "
- "DD "
- " "
ingredients:
D: "DIAMOND_BLOCK"
Cross Pattern
crafting:
enabled: true
output-amount: 1
shape:
- " E "
- "ENE"
- " E "
ingredients:
E: "END_CRYSTAL"
N: "NETHERITE_INGOT"
Material Names
Use Bukkit material names. Common examples:
| Material | Name |
|---|---|
| Diamond | DIAMOND |
| Diamond Block | DIAMOND_BLOCK |
| Emerald | EMERALD |
| Gold Block | GOLD_BLOCK |
| Nether Star | NETHER_STAR |
| Netherite Ingot | NETHERITE_INGOT |
| End Crystal | END_CRYSTAL |
| Enchanted Book | ENCHANTED_BOOK |
Full list: Bukkit Materials
GUI Editor
Edit crafting recipes in-game:
/voucher edit <name>
- Click on Crafting button
- Toggle enable/disable
- Set output amount
- Set permission
- Edit shape pattern
- Configure ingredients
Tips
Balanced Recipes
Make recipes match voucher value:
- Common vouchers: Basic materials
- Rare vouchers: Expensive materials
- Legendary vouchers: Very rare materials
Permission Gating
Use permissions for special vouchers:
permission: "cocovouchers.craft.legendary"
Only give this permission to certain ranks.
Shapeless Alternative
Currently only shaped recipes are supported. For shapeless-like behavior, create multiple vouchers with different shapes producing the same reward.