Cooldowns & Use Limits

1command
2files
1figure
2min read
Sheet 17 of 33 · Shop & Access

Filesschematics/towers/watchtower.yml · config.yml

Fileschematics/towers/watchtower.ymlFileconfig.ymlCommand/paste statsTwo sidecar keys limit how often one player pastes a schematic:

schematics/towers/watchtower.yml
cooldown-seconds: 600        # wait 10 minutes between pastes
max-uses-per-player: 3       # and at most 3 pastes, ever

Both are per player and per schematic. Both count completed pastes, including pastes from vouchers and one-time sessions.

Cooldowns

After a paste completes, the player cannot paste that schematic again for cooldown-seconds. Trying gives This schematic is on cooldown. Try again in 448s.

The watchtower was pasted from a voucher a few minutes earlier. The cooldown counts it.
Chat: Selected schematic towers/watchtower, then This schematic is on cooldown. Try again in 448s.

The selector shows the cooldown and what is left of it through <cooldown> and <remaining>: Cooldown: 600s (448s), or (Ready).

Use limits

max-uses-per-player is a lifetime cap. Once a player has pasted a schematic that many times: You have reached the paste limit for towers/watchtower (3 uses). 0 means no cap. The selector's <uses_left> counts down, ∞ without a cap.

A use is never given back: undoing a paste does not return it. Pair max-uses-per-player: 1 with a plot check for a one-house-per-player plot server.

Settings

config.yml
cooldown:
  enabled: true
  persist: true
  bypass-permission: ignitepaste.cooldown.bypass
KeyMeaning
cooldown.enabledfalse turns cooldowns off. Use limits still apply
cooldown.persisttrue saves cooldowns and use counts to the storage backend, so they survive restarts. false keeps them in memory only: a restart clears them. /paste stats are saved either way
cooldown.bypass-permissionPlayers with this node skip both cooldowns and use limits. Operators have it by default

Where they are stored

Fileconfig.ymlCooldowns, use counts and the paste stats share one store, set under storage in config.yml: a YAML file by default, or SQLite or MySQL. On MySQL, servers that share the database share cooldowns and limits, which stops players from pasting the same one-per-account house once on each server. See Storage.

The data is keyed by schematic name. Rename or move a schematic and its cooldowns and counts start from zero.

Placeholders

PlaceholderReturns
%ignitepaste_cooldown_<name>%Seconds left on the player's cooldown for that schematic, 0 when ready
%ignitepaste_uses_<name>%How many times the player has pasted it

<name> is the schematic name with its folder: %ignitepaste_cooldown_towers/watchtower%.

Loading the index

Enter openUp Down moveEsc close