Reward the winners
Give items and commands to the winner and the top three, and see what happens to offline winners.
By the end of this page the winner of an event, and the top three if the type has a podium, receive what you chose: items, money, experience, effects or commands. Everything is edited in game with the reward editor. Nothing is written in YAML.
Before you start#
You need an event (see Your first event) and the exyliacapture.admin permission. Money rewards need an economy set up in ExyliaLib: see Economy.
Steps#
Open the commands hub
Run /captureadmin, click Configurations, left-click your event, then click Commands. The button shows how many start commands, end commands and winner rewards the event has.
Open the slot you want
- Winner reward: whoever the event declares the winner. A plain KOTH and a Bounty end with a single winner, so this is the slot they use.
- #1 reward, #2 reward, #3 reward: first, second and third place on the event's own podium. The point-scored types (KOTH Points, KOTH Capture Points), Conquest, Payload and Destroy The Core build a podium.
Add what they get
In the editor, add a reward and choose its type: item, several items at once, a command, money, experience or a potion effect. Each reward can have a chance, a permission and a condition. The editor is the shared one from ExyliaLib: Rewards explains every field.
Save
Save from the editor. The event updates at once.
A command reward runs from the console, and %player_name% is the player who won. For example:
give %player_name% diamond 5Check that it works#
Start the event with /captureadmin start <id> and capture it yourself. The reward arrives when the win is announced. If you are testing as an operator, remember a reward can have a permission or condition that you must meet.
Going further#
Offline winners and full inventories#
If the winner is online the reward is given at once. If not, it waits and is delivered the next time they join, with the event name and the position. A reward is never lost because somebody disconnected before the event ended.
The same queue holds what a full inventory cannot take: items that do not fit are kept and handed over on the player's next join, rather than dropped. They are told how much arrived with the rewards.claimed message (%amount%) in messages.yml. Staff can browse what is waiting, player by player, with /exylialib pendingrewards.
Boosters#
Every prize goes through ExyliaLib's modifiers under the source capture. The scope is capture:<id>, the event's id, so a boost can cover every event or just one. For example, the permission exylia.modifier.money.capture.2 gives double money from every capture prize. A queued prize is boosted when it is queued and paid as it is on the next join.
Clan events: who is paid#
In a clan-scored event the podium is a list of clans, and each clan is paid through one representative, chosen in this order:
- Any member of that clan who is online.
- Otherwise a leader of the clan.
- Otherwise any registered member.
Statistics work differently. A clan win is recorded for every participating member of the winning clan, so the whole clan's win counter goes up while the reward goes to one player.
Commands when an event starts or ends#
The same Commands screen has two more lists: Start commands run when the event starts, and End commands run when it ends, whatever the outcome (win, cancel or timeout). The console runs them and %event_name% is replaced with the event's display name. Give each entry a name in the editor so a long list stays readable.
broadcast &e%event_name% &7has startedStart and end commands are about the event, not a person, so %player_name% has nothing to fill in. Use a reward to give something to a player.
Older events#
Events written by an older version stored rewards and commands in a single block. The first load converts each event to the current format and marks it as converted, so it happens once.
Technical details
| Where | Detail |
|---|---|
| Queue table | capture_pending_rewards. It is emptied before the items are handed over, not after, so a failure during delivery cannot duplicate a reward on the next join. |
| Message key | rewards.claimed in messages.yml, with %amount%. See Messages and languages. |
| Booster source | capture, scope capture:<id>. |
| Staff command | /exylialib pendingrewards, permission exylialib.pendingrewards. |
Something missing on this page? Tell us on Discord