Voucher templates
templates.yml defines how vouchers look and what happens when they are redeemed. Ten templates are included: gift cards default, premium, vip, holiday, and coupons default, premium, seasonal, flash, vip, holiday.
Each template supports:
item: the material of the voucher item.nameandlore: colored with&codes. Placeholders include{amount},{expires}and, for coupons,{effective_on}.lore_effective_on(coupons): the lore used when the coupon is limited to a package or category.glowandcustom-model-data: optional glint and resource pack model.effects:title,sound,fireworkandcommandsshown or run on redeem.{player}works in commands.
The included default gift card template:
giftcards:
default:
item: PAPER
name: '&a&lGIFT CARD &8• &6${amount}'
lore:
- ''
- '&7━━━━━━━━━━━━━━━━━━━━━━━'
- ''
- ' &7Store Credit: &a&l${amount}'
- ' &7Valid Until: &e{expires}'
- ' &7Status: &a✔ Active'
- ''
- ' &e&l➤ &eRIGHT-CLICK TO REDEEM'
effects:
title:
enabled: true
main: '&a&lGift Card Redeemed!'
sub: '&7Enjoy your &6${amount} &7credit'
sound:
enabled: true
name: ENTITY_PLAYER_LEVELUP
volume: 1.0
pitch: 1.0
firework:
enabled: true
power: 1
commands:
- 'say &a{player} &7redeemed a gift card worth &6${amount}&7!'
(The lore above is shortened. The file has a longer description block.)
Custom templates
Copy any template, give it a new name, then use that name in /hc give. Coupon templates also accept discount_type: PERCENTAGE to set their default type.