ProVouchers

Code Reference

Typeable redemption codes, with per-player and global use limits.

A code is one plugins/ProVouchers/codes/<id>.yml file. Players redeem it by typing /voucher redeem <code>. Codes share the Conditions and Rewards systems with vouchers; this page covers the fields that are specific to codes.

Full example

codes/launch_gift.yml
code: LAUNCH2026
case-sensitive: false
max-uses: 500
uses-per-player: 1
expiry: "2026-12-31T23:59:59Z"
conditions:
  - type: permission
    permission: "provouchers.redeem"
rewards:
  - "currency: give 1000"
  - "item: itemsadder:ax_wings_pack:phoenix_wings 1"
  - "message: <gradient:#FFD700:#FF4500>Thanks for joining at launch!</gradient>"

Fields

KeyTypeDefaultNotes
codestringfile nameThe literal text players type.
case-sensitivebooleanfalseWhen false, LAUNCH2026 and launch2026 both match.
max-usesinteger-1Global redemption cap across all players. -1 means unlimited.
uses-per-playerinteger1How many times a single player may redeem it.
expirystring""Use an absolute ISO-8601 instant (see the note below).
conditionslistemptySee Conditions.
rewardslistemptySee Rewards.
random-rewardslistemptyWeighted "pick one" rewards.
has-argumentbooleanfalseAccept a trailing argument, exposed to rewards as {arg}.

Use limits

Codes have two independent limits, both backed by the database so they survive restarts:

  • uses-per-player caps how many times one player may redeem the code. With the default 1, each player may redeem it once.
  • max-uses caps the total redemptions across everyone. Set it to limit a giveaway to the first N claims; leave it at -1 for no global cap.

Both are checked together, off the main thread, before any reward runs.

Arguments

With has-argument: true, players pass a value that rewards can use through the {arg} token:

codes/referral.yml
code: REFER
has-argument: true
rewards:
  - "broadcast: <green>%player% was referred by {arg}!"
  - "currency: give 100"
/voucher redeem REFER Steve

The {arg} is substituted into rewards and messages before MiniMessage is rendered. See Rewards for the full token list.

Expiry

Unlike voucher items, a code has no per-item give time. Use an absolute ISO-8601 instant (2026-12-31T23:59:59Z) for code expiry. A relative duration (30d) is not measured from a meaningful start point for codes.

Tab completion

/voucher redeem does not currently suggest code names in tab completion (codes are often meant to be shared out of band, not discovered). Type the code exactly, honouring case-sensitive when it is set.

On this page