Skip to content

Voucher files

Each file in plugins/Claimo/vouchers/ defines one voucher. The file name (without .yml) is the code players redeem. Add a code by dropping in a new file, then run /code reload.

plugins/Claimo/vouchers/test.yml
# vouchers/test.yml → redeemed with /code test
# One command (string) or several (list). A leading "/" is optional.
# %player% is replaced with the player's name. If PlaceholderAPI is installed,
# any other %placeholder% (e.g. %player_uuid%, %vault_eco_balance%) is resolved too.
cmd: "lp user %player% parent addtemp vip 7d"
# Run as console (true) or as the player (false). Default: true.
console: true
# Hide from the GUI and tab-completion (still redeemable by code). Default: false.
hide: false
# Optional expiry as a human-friendly duration: s, m, h, d, w — e.g. 500s, 10m,
# 5d, 10w, or combined 1d12h. Counted from `created` if present, otherwise from
# the file's last-modified time. Omit for a code that never expires.
expires: 30d
# Optional redemption limit. Omit for unlimited.
limit:
mode: per-player
amount: 1
# All requirements must pass before the code is redeemable. Optional.
requirements:
- type: blocks_mined
amount: 100

The heart of a voucher. Accepts a single string or a list of strings; a leading / is optional.

cmd: "give %player% diamond 5"
  • %player% is replaced with the redeeming player’s name.
  • With PlaceholderAPI installed, any other %placeholder% (e.g. %player_uuid%, %vault_eco_balance%) is resolved too.

default: true — run the command as console (true) or as the player (false).

console: false # runs as the player, with their permissions

default: false — when true, the code is excluded from the GUI and tab-completion but stays redeemable by typing it exactly. Ideal for secret or event codes.

A human-friendly duration, omit for a code that never expires.

Unit Meaning Example
s seconds 500s
m minutes 10m
h hours 12h
d days 5d
w weeks 10w

Units combine: 1d12h means one and a half days.

Omit for unlimited redemptions.

Each player may redeem amount times — no shared pool.

limit:
mode: per-player
amount: 1

amount defaults to 1.

An optional list of checks; all must pass before the code redeems. Each entry has a type and that type’s own parameters.

requirements:
- type: playtime
seconds: 3600
- type: account_age
days: 7

See Requirements for the full catalogue of built-in types and their parameters.

After editing any voucher file, apply your changes:

/code reload