Skip to main content

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:

MaterialName
DiamondDIAMOND
Diamond BlockDIAMOND_BLOCK
EmeraldEMERALD
Gold BlockGOLD_BLOCK
Nether StarNETHER_STAR
Netherite IngotNETHERITE_INGOT
End CrystalEND_CRYSTAL
Enchanted BookENCHANTED_BOOK

Full list: Bukkit Materials


GUI Editor

Edit crafting recipes in-game:

/voucher edit <name>
  1. Click on Crafting button
  2. Toggle enable/disable
  3. Set output amount
  4. Set permission
  5. Edit shape pattern
  6. 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.