Money & Confirmation

3commands
1permission
3files
3min read
Sheet 15 of 33 · Shop & Access

Filesconfig.yml · schematics/buildings/mansion.yml · data/pending-refunds.yml

Fileconfig.ymlFileschematics/buildings/mansion.ymlCommand/paste speedupCommand/paste reloadIgnitePaste charges through Vault, so it works with EssentialsX, CMI or any other economy plugin with a Vault hook. Money shows up in four places: the paste price, /paste speedup, tier upgrades and building pick-up.

Setting it up

config.yml
economy:
  enabled: false                        # true to charge money
  refund-on-fail: true
  free-permission: ignitepaste.economy.free
  confirm-purchases: true
  confirm-timeout-seconds: 30
  refund-window-seconds: 30

Command/paste reloadSet enabled: true, install Vault and an economy plugin, and run /paste reload (or restart). The console confirms with Vault economy hooked: EssentialsX Economy. If Vault is there but no economy registered with it, you get Vault found but no economy provider is registered - economy features disabled.

When the economy is off or not hooked, every money cost counts as free. Item costs from cost-items still apply, they do not need Vault.

Prices

The price of a schematic is cost in its sidecar:

schematics/buildings/mansion.yml
cost: 1500.0

The selector shows it as <cost>, formatted by your economy plugin ($1,500). A player who cannot afford it is told before anything happens: You need $1,500 to paste this. Your balance: $820.

SettingWhere
Paste pricecost in the sidecar
Speed-up priceconstruction.speed-up.cost, or speed-up-cost in the sidecar
Upgrade priceupgrade-cost in the current tier's sidecar, else the next tier's cost
Pick-up pricebuildings.pickup.cost

Permissionignitepaste.economy.freeConfig keyeconomy.free-permissionPlayers with ignitepaste.economy.free (the node is economy.free-permission) never pay money for any of them, and see Free in the selector. Operators have it by default.

The confirmation menu

With confirm-purchases: true, a paste or upgrade that costs money or items opens a small menu first. It lists the schematic, its folder, the price, the build time and every material. For an upgrade the build time is the upgrade's own upgrade-duration. Confirm pays and pastes, Cancel or closing the menu forgets it and charges nothing. Left alone for confirm-timeout-seconds (at least 5), the menu closes itself: The purchase prompt timed out. Nothing was charged.

The price is checked again when you confirm: spend the money or the items while the menu is open and the paste is refused instead of running for free.

Vouchers and blueprints skip the menu, they are already paid for. With confirm-purchases: false the paste runs as soon as the wand is clicked.

When money is taken

ActionCharged
Instant (sync) pasteRight before the blocks go down
Async pasteWhen it starts
ConstructionWhen it starts, confirmed in chat when it finishes: Charged $1,000 for this paste.
UpgradeUp front, before the crew starts
Pick-upUp front. Refunded if capturing the building fails
Speed-upOn each use

Refunds

SituationRefund
Undo (tool or /paste undo) within refund-window-secondsFull money cost, unless items were taken out of the pasted containers
Undo after the windowNone
Construction cancelled by leaving paste mode or logging out, with construction.rollback-on-cancel: trueMoney, items and voucher, whatever the refund window
Construction cancelled with rollback-on-cancel: falseNone, the partial build stays
A paste, upgrade or pick-up that fails partway, with refund-on-fail: trueMoney, items and voucher; the blocks are put back
Server stop during a paste, construction, upgrade or pick-upMoney, items and voucher; the blocks are put back

Undo refunds money only; items from cost-items come back on cancels, failures and stops. Set refund-window-seconds: 0 to turn undo refunds off.

Filedata/pending-refunds.ymlA refund during a server stop is paid right away when the economy plugin is still running. If it already shut down, the amount is kept in data/pending-refunds.yml and paid on the next start.

Loading the index

Enter openUp Down moveEsc close