Skip to content

redeem.yml

Redeem codes. The codes themselves are made in game with /redeemadmin and stored in the database.

How it plays: read the guide

Every example on this page is taken from the shipped redeem.yml. Changes apply with /hcf reload. enabled: true at the top switches the module.

Failed attempts

redeem.yml
# After a failed attempt - no such code, already used, all used up - how long a
# player waits before the next one. Without it, codes could be found by trying
# names as fast as chat allows.
failed-attempt-cooldown-seconds: 3
Key As shipped What it does
failed-attempt-cooldown-seconds 3 Wait after a failed code, so codes cannot be guessed by trying names

The whole shipped file

View it on GitHub.

redeem.yml
# ---------------------------------------------------------------------------
# redeem.yml - redeem codes
#
# Codes are not written here: staff make them in game, and they are stored.
#
#   /redeemadmin create <code> <max-uses|unlimited> <command>
#   /redeemadmin addcommand <code> <command>      another reward
#   /redeemadmin removecommand <code> <number>    numbers come from info
#   /redeemadmin setuses <code> <max-uses|unlimited>
#   /redeemadmin info <code> | list | delete <code>
#   /resetredeem <code> [player]                  usable again, by one or by all
#
# A reward is a console command with %player% filled in - an item, money, a
# rank, a kit, from whichever plugin provides it:
#   /redeemadmin create SUMMER 100 eco give %player% 500
#
# Every player can redeem a given code once. max-uses caps how many players can
# redeem it in all: 1 for a single-use code, unlimited for an open giveaway.
#
# Lines "# --8<-- [start:...]" and "# --8<-- [end:...]" mark the parts the online
# documentation quotes from this file. They are comments and change nothing.
# ---------------------------------------------------------------------------

enabled: true

# After a failed attempt - no such code, already used, all used up - how long a
# player waits before the next one. Without it, codes could be found by trying
# names as fast as chat allows.
failed-attempt-cooldown-seconds: 3