Skip to content

Giveaways and redeem codes

Two ways to give somebody something, for two different reasons.

Giveaways

A prize, a countdown, and one click to enter.

/giveaway start vipweek
/giveaway start 300 1 A stack of diamonds

The second form is seconds, then winners, then the prize as free text - for when somebody wants to run one right now and there is no preset for it.

The announcement carries its own [ Click to enter ] button, and so does every reminder. That matters more than the prize: a giveaway that needs a typed command loses most of the people who saw it.

Reminders fire at 120, 60, 30, 10 and 5 seconds by default. Keep that list short - it is the part that becomes annoying first.

Presets

presets:
  vipweek:
    prize: "<#ec407a>VIP for a week"
    duration-seconds: 600
    winners: 1
    min-playtime-minutes: 120
    commands:
      - "lp user %player% parent addtemp vip 7d"

min-playtime-minutes is the one worth setting on anything valuable. A week of VIP is worth real money, and without it the draw includes every alt account made that morning.

Deliberate limits

One giveaway at a time. Two countdowns in the same chat compete for attention and both do worse than either would alone.

Entries live in memory. A giveaway lasts minutes, so a restart in the middle of one is rare enough that re-running it costs less than writing every entry to disk. If the server stops mid-countdown the draw happens on the way down rather than the prize vanishing.

Redeem codes

A string somebody types to get something.

/redeem summer2026

These are what you hand out on Discord, in a video description, or to somebody who had a bad day. Make one from in game, then fill in its rewards:

/redeemadmin create summer2026 100 30
                    name ---^   ^   ^-- expires in 30 days
                             100 uses
/redeemadmin reload

Four limits, all of which matter

codes:
  welcome:
    display: "Welcome pack"
    message: "<#66bb6a>Welcome aboard. Check your inventory."
    max-uses: -1          # -1 is unlimited
    once-per-player: true
    expires-at: 0         # epoch millis, 0 never expires
    money: 500
    commands:
      - "kit give welcome %player%"

The codes that go wrong in public are always the ones with a limit missing.

Written before the reward runs

A code's use count is saved to disk the moment it is claimed, before the reward is handed out. A crash between the two costs a player a prize they can ask staff about. The other order costs you a code that can be claimed for ever - and codes get shared, so a code that can be used twice will be.