Content generated with AI — it may contain mistakes.

Configuring

Rewards

Per-event rewards, global reward commands, and what happens when a winner is offline.

There are two independent reward layers: the ones a configuration carries, and the commands config.yml runs for every event.

Per-event rewards

Each configuration has two lists, edited with the reward editor in the admin panel:

ListGiven to
Winner rewardsWhoever the event declares the winner
Participant rewardsEveryone else who played

They are handed over a moment after the event ends, so the items land after the player has been returned to the lobby rather than into an inventory that is about to be cleared.

Global reward commands

config.yml carries console commands run for every event, whichever configuration it was:

config.yml
reward-commands:
  only-on-random-events: false
  participant:
    - "console: give %player% coal 1"
  winner:
    - "console: give %player% diamond 1"
KeyDefaultWhat it does
only-on-random-eventsfalseWhen true, these commands only run for events the scheduler started.
participantone exampleCommands run for each participant. %player% is substituted.
winnerone exampleCommands run for each winner.
only-on-random-events

It exists so a staff member testing an event by hand does not hand out prizes. Turn it on and only automatically started events pay out — see Game flow.

Offline winners

If a player is offline when rewards are handed out, their per-event rewards are queued in event_pending_rewards along with the event name and whether they won, and delivered the next time they join. Nothing is lost because somebody disconnected in the last seconds.

/exylialib pendingrewards lists what is still owed, alongside every other plugin's pending rewards. Each batch is named after its event, with (winner) when the player won, and staff can hand it over or cancel it from there. It needs exylialib.pendingrewards.

Which layer to use

You wantUse
Different prizes per eventThe configuration's own reward lists
The same prize for every event on the serverThe global reward commands
Economy money, permissions, crate keysGlobal commands, or commands inside the reward editor
Physical items, exactly as configuredThe reward lists

Both layers run for the same event, so a configuration with its own rewards and global commands gives both.

Something missing on this page? Tell us on Discord