Vouchers

1permission
1file
1figure
2min read
Sheet 18 of 33 · Shop & Access

Filesconfig.yml

Fileconfig.ymlA voucher is an item bound to one schematic. Right-clicking it uses up one voucher and opens a one-time paste session with that schematic selected. The money and material cost are waived and there is no confirmation menu: the voucher is the payment.

That makes vouchers the way to sell or give builds through anything that hands out items: crates, kits, quests, a /shop, ChestShop signs, trades between players.

A voucher for the watchtower. The item stacks, one is used per paste.
A Schematic Voucher tooltip: right-click to redeem, schematic towers/watchtower, folder towers, build time 45s

Giving vouchers

/paste voucher give <player> <schematic> [amount]
/paste voucher give Steve towers/watchtower 3

Permissionignitepaste.adminNeeds ignitepaste.admin, and runs fine from the console. The player must be online. Console reply: Gave 3× voucher for towers/watchtower to Steve. Vouchers that do not fit a full inventory drop at the player's feet and they are told: Your inventory is full, so some towers/watchtower vouchers were dropped at your feet. A player in paste mode gets them in the inventory they get back on leaving.

With vouchers.enabled: false the command refuses with Schematic vouchers are disabled on this server.

Redeeming

Right-click with the voucher in either hand, pointing anywhere. Then:

SituationResult
vouchers.enabled: falseSchematic vouchers are disabled on this server. Nothing used
Already in paste modeLeave paste mode before redeeming a voucher. Nothing used
An upgrade or pick-up of yours is runningWait for your running construction to finish. The voucher was kept. Nothing used
The schematic no longer existsVoucher references unknown schematic <name>. Nothing used
The player lacks the schematic's permission, or the world is not allowedYou do not have permission to use the schematic on this voucher. Nothing used
OtherwiseOne voucher is used: Voucher redeemed. Paste mode started for towers/watchtower.

Cooldowns, max-uses-per-player, the building limit and the region, plot and town checks still apply at paste time.

Config keyeconomy.refund-on-failThe voucher is only used up by a paste that lands. Close the session without pasting, log out, or have a construction cancelled with rollback-on-cancel, and the voucher comes back to the inventory. A failed paste gives it back with economy.refund-on-fail, and a server stop always does.

The item

config.yml
vouchers:
  enabled: true
  material: PAPER
  custom-model-data: 0
  display-name: "<gradient:#FFB86B:#FFD166><bold>Schematic Voucher</bold></gradient>"
  lore:
    - "<gray>Right-click to redeem."
    - "<dark_gray>Schematic: <yellow><name>"
    - "<dark_gray>Folder: <gray><folder>"
    - "<dark_gray>Build time: <yellow><construction>"
    - ""
    - "<#7CFF9B>Paste once. The cost is already paid."
PlaceholderValue
<name>Schematic name
<folder>Its folder
<cost>Its money cost as a whole number, for "worth $1500" lines
<construction>Build time, 45s or Instant

The name and lore are written onto the item when it is given. Changing the config later does not update vouchers already handed out, but they keep working: the item stores only the schematic name in its data.

vouchers.enabled: false turns vouchers off: no giving, no redeeming, and the ones players hold stay in their inventories until it is back on. To stop a single schematic being redeemed, remove its permission or the schematic.

Loading the index

Enter openUp Down moveEsc close