VZone Plugins/VVoucher/Voucher System

Voucher Format

Each top-level key in a voucher YAML file is a voucher id.

money:
  Material: PAPER
  Name: "<gradient:#1378FF:#60BFFB>Money Voucher</gradient>"
  Usage: 1
  Action: "SHIFT + RIGHT CLICK"
  TooltipStyle: global:mythic
  Random:
    Min: 20000
    Max: 50000
  Command: "eco give %player% %random-amount%"

Voucher Options

OptionMeaning
MaterialBukkit material name for the item.
Material: HDB-12345Uses a HeadDatabase head id as the voucher item.
NameDisplay name of the item.
TextureOptional base64 texture. Only works with Material: PLAYER_HEAD.
LoreLore lines shown on the item.
UnbreakableTrue or false.
CustomModelDataSet -1 to disable.
TooltipStyleOptional namespace:path tooltip style, only applied on Minecraft 1.21.2+.
MaxStackSizeOptional per-item max stack size. Use -1 or leave it out to disable it.
GlowTrue or false.
UsageHow many times the voucher can be used before it is removed.
EnableOptional true or false. Defaults to true if missing.
ActionRequired interaction type that triggers the voucher.
CommandConsole command executed on use.
Message-ChatOptional chat message on voucher use.
Message-TitleOptional title and subtitle on voucher use.
Message-ActionBarOptional action bar message on voucher use.
Random-CommandWeighted random command list.
EventInside a random reward entry, calls a reusable external event table from events/*.yml.
Random.Min / Random.MaxVoucher-level random range for %random-amount%.
AttributesOptional item attributes.
EnchantmentsOptional item enchantments.
ItemFlagsOptional item flags.
PotionOptional potion effect applied to the player.

Option Examples

Each option below includes a practical YAML snippet so you can see how it looks in a real voucher file.

Material

fly-permission:
  Material: FEATHER

Material: HDB-12345

hdb-head-example:
  Material: HDB-13376

Name

money:
  Name: "<gradient:#1378FF:#60BFFB>Money Voucher</gradient>"

Texture

texture-head-example:
  Material: PLAYER_HEAD
  Texture: "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNzRlOGZmMzBlMzkzNzA5ODYzN2MwYWYwM2ExZjJhNmIxN2YwZTgyOGFiMmE1N2EyNjdhMDFkYTQ4NGJhMGM1NyJ9fX0="

Lore

money:
  Lore:
    - ""
    - "բFF????????????"
    - "  &8&l| &fMoney: <BFFB20,000-50,000"

Unbreakable

fly-permission:
  Unbreakable: false

CustomModelData

money:
  CustomModelData: -1

TooltipStyle

money:
  TooltipStyle: global:mythic
  • Optional and only applied on Minecraft 1.21.2+.
  • The value must use namespace:path format.
  • Minecraft stores it as the minecraft:tooltip_style data component.
  • The client resource pack needs assets/<namespace>/textures/gui/sprites/tooltip/<path>_background.png and .../<path>_frame.png.
  • If the textures are missing, Minecraft shows the missing texture.
  • Invalid values are skipped with a console warning because Bukkit only accepts valid NamespacedKey values.

MaxStackSize

event-example:
  MaxStackSize: 64
  • Optional.
  • If it is missing, the voucher uses the normal item stack behavior.
  • If it is set to -1, VVoucher does not override the stack size.
  • If the running server version does not support custom item max stack size, the plugin safely skips it.

Glow

fly-permission:
  Glow: true

Usage

fly-permission:
  Usage: 2

Enable

money:
  Enable: true

Action

money:
  Action: "SHIFT + RIGHT CLICK"

Command

money:
  Command: "eco give %player% %random-amount%"

Message-Chat

random-permission:
  Message-Chat: "{prefix} You opened a random permission voucher."

Message-Title

random-permission:
  Message-Title:
    Title: "բFFRandom Permission"
    SubTitle: "&7Good luck!"

Message-ActionBar

random-permission:
  Message-ActionBar: "{prefix}&7You opened your voucher."

Random-Command

random-permission:
  Random-Command:
    Command1:
      Chance: 20
      Command: "lp user %player% permission settemp essentials.fly true 1h"
    Command2:
      Chance: 80
      Command: "eco give %player% 500"

Event

event-example:
  Random-Command:
    Command1:
      Chance: 50
      Event: "example-event"

Random.Min and Random.Max

money:
  Random:
    Min: 20000
    Max: 50000

Attributes

tank-voucher:
  Attributes:
    GENERIC_ARMOR:
      Value: 20
      EquipmentSlot: HAND

Enchantments

enchanted-voucher:
  Enchantments:
    DURABILITY: 3

ItemFlags

money:
  ItemFlags:
    - HIDE_ATTRIBUTES
    - HIDE_UNBREAKABLE

Potion

strength-voucher:
  Potion:
    Type: "STRENGTH"
    Level: 2
    Duration: 90

Supported Actions

RIGHT CLICK LEFT CLICK MIDDLE CLICK SHIFT + RIGHT CLICK SHIFT + LEFT CLICK SHIFT + MIDDLE CLICK HAND SWITCH SHIFT + HAND SWITCH

Command Placeholders

  • %player%
  • %uuid%
  • %random-amount%
  • %local-random% inside random reward entries that define a local Random
  • %current-usage%
  • %max-usage%

PlaceholderAPI placeholders are also supported in voucher names, lore, messages, commands, and random reward commands or messages.

Name and lore use the player who receives or views the item. Messages and commands use the player who actually used the voucher.

Voucher Use Messages

random-permission:
  Message-Chat: "{prefix} Nyitottál egy random permissiont."
  Message-Title:
    Title: "բFFRandom Permission"
    SubTitle: "&7Sok szerencsét!"
  Message-ActionBar: "{prefix}&7Megnyitottad a random permission voucheredet."

Random-Command

event-example:
  Material: IRON_INGOT
  Name: "<gradient:#1378FF:#60BFFB>Event Example Voucher</gradient>"
  Usage: 1
  Action: "SHIFT + RIGHT CLICK"
  MaxStackSize: 64
  Random-Command:
    Command1:
      Chance: 50
      Message-Chat: "{prefix} You got nothing!"
    Command2:
      Chance: 50
      Event: "example-event"
  • Each entry id can be any name.
  • Chance is required.
  • Command is required unless the reward uses Event.
  • Message fields are optional.
  • Event is optional and can call a reusable reward table from events/*.yml.
  • Random is optional and belongs only to that reward entry.
  • Total chance does not need to equal 100.
  • Higher Chance means higher selection weight.
  • If Random-Command exists, it takes priority over normal Command.
  • If a reward uses Event, VVoucher selects one reward from that external event table.
  • %local-random% only exists inside the selected random reward entry.
  • %random-amount% still refers to the voucher-level random section.

Events Folder

You can create reusable weighted reward tables inside plugins/VVoucher/events/.

example-event:
  reward-1:
    Chance: 20
    Command: "give %player% diamond 1"
    Message-Chat: "{prefix} You got a բFFdiamond&7!"
  reward-2:
    Chance: 10
    Command: "give %player% diamond 2"
  reward-3:
    Chance: 70
    Command: "give %player% iron_ingot 1"
  • Each top-level key is an event id.
  • Event rewards need Chance and normally Command.
  • Event rewards support Message-Chat, Message-Title, Message-ActionBar, and local Random.
  • Event rewards do not support nested Event calls.

HeadDatabase and Custom Heads

random-permission:
  Material: HDB-127387
  Name: "<gradient:#1378FF:#60BFFB>Random Permission</gradient>"
random-permission:
  Material: PLAYER_HEAD
  Texture: "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvZjYwY2Y0ZGJmY2NiODg1YTNkNmVkZGIwZDE3ZDFhMDMxNTkxOGUxZTcyYTJkZDg1Njk0OTE5MTNjOWI2MzUxZSJ9fX0="
  Name: "<gradient:#1378FF:#60BFFB>Random Permission</gradient>"
  • HDB-<id> treats the material as a HeadDatabase head.
  • Texture only works with Material: PLAYER_HEAD.
  • If HeadDatabase is missing, HDB materials cannot be created correctly until it is installed.

Identification and Vanilla Blocking

Voucher items are identified with persistent data, not by display name or lore. Internal marker format:

vvouchers:%config-key%

This means the plugin can still recognize the voucher even if the item is renamed visually, as long as the stored metadata remains intact.

Items created by VVoucher no longer behave like their original Minecraft material. Block vouchers cannot be placed, ender pearls cannot be thrown normally, fireworks cannot be launched normally, and consumable materials cannot be consumed normally. They only work through the configured voucher action.

Language System and Error Handling

config.yml controls the active language. Example:

language: en

This loads plugins/VVoucher/lang/en.yml. You can switch to Hungarian with language: hu.

For normal configuration mistakes, the plugin tries to print a readable warning instead of a useless stack trace:

[Config Error] example.yml -> money.Material: Unknown material: PAPERR