Using it

Stock, limits and cooldowns

Stock#

Stock is shared by all players. Turn it on per item:

stock:
  enabled: true
  max: 10
  regenerate: true
  regen-time: 1h
  regen-amount: 1
  regen-interval: 1h
  regen-date: "2030-01-01"

With regenerate: true, restocking works like this (the file checks them in this order):

  • regen-date: when the date passes and the item is sold out, it is restocked to max. Accepts yyyy-MM-dd, yyyy-MM-dd HH:mm or yyyy-MM-dd HH:mm:ss.
  • regen-time: how long after selling out the item returns to full stock.
  • regen-interval and regen-amount: add regen-amount to the stock every interval, up to max. This applies when neither a date nor a regen time is set.

Restocks are announced in chat when shop.announce-restocks is on. A webhook warning is sent when stock falls to shop.low-stock-warning. Admins can change stock with /mccs stock set <category.item> <amount> or /mccs stock refill <category.item>.

Limits#

limit:
  enabled: true
  max-purchases-per-player: 1
  reset-every: 7d

A player can buy at most max-purchases-per-player. With reset-every the count resets after that time, which is useful for weekly kits.

Cooldown#

cooldown: 10m is the time a player must wait before buying the same item again.

Time values use units such as 30s, 10m, 1h, 7d.