Rewards
Places, ranges and participation, what a reward block can give, the minimum participants rule, and how offline winners are paid.
Every event carries its own rewards block in events.yml. When the event ends, the plugin ranks everyone who scored, announces the top places, and works through the block paying each place. Anyone who is offline at that moment has their reward parked and gets it on their next join.
Places
The key of each block says who it pays.
| Key | Who gets it |
|---|---|
"1", "2", "3" and so on | That one place |
"4-10" | Every place in the range, both ends included |
participation | Everyone who scored and was not paid a place above |
rewards:
"1":
commands:
- "eco give %player% 10000"
- "crate give %player% vote 3"
message: "&aYou won the Stone Rush with &f%score% &apoints."
"2":
commands:
- "eco give %player% 5000"
"4-10":
commands:
- "eco give %player% 500"
participation:
min-score: 50
commands:
- "eco give %player% 100"A key that is not a number, a range or participation is skipped with a console warning naming it, and the rest of the block still loads. A block that gives nothing at all is skipped the same way.
What a block can give
Inside any place, any of these can be used and mixed. Each one is given on its own, so a command for a plugin the server does not have cannot stop the money, the items or the message that were meant to go with it.
| Key | What it does |
|---|---|
commands | A list of commands run from the console. %player%, %score%, %position%, %event% and %island% are filled in. |
money | An amount paid through Vault. Needs Vault and an economy plugin, otherwise the console warns and nothing is paid. |
items | A list of items given straight into the inventory. Anything that does not fit drops at the player's feet. |
message | A line sent to that player, with the same placeholders as the commands. |
min-score | The lowest score needed before this place pays anything. |
An item is written like this:
items:
- material: DIAMOND_PICKAXE
amount: 1
name: "&bWinner's Pickaxe"
lore:
- "&7Won the Stone Rush"
enchantments:
EFFICIENCY: 5
UNBREAKING: 3An item or enchantment name the running version does not have is skipped with a warning, and the rest of the reward still goes.
min-score
A place pays nothing to a score below its min-score. That stops a participation reward going to someone who broke one block, and stops third place being paid to a score of two on a quiet night. In a team event the number that has to clear it is the island total shown on the ranking line, not one member's own share. See Team mode.
Minimum participants
event-defaults:
min-participants: 3When fewer players than this scored, nobody is paid at all, the event.not-enough-players message goes out with the count and the number needed, and the console names the key. It counts players who scored, not players online. The shipped default is 3, which is the most likely reason a small test pays nothing, so set it to 0 while testing alone.
Offline winners
A winner who is offline at the end has the reward stored in the database along with the place and the score. On their next join they are told something is waiting, and /event claim hands everything over. The stored reward remembers the place key rather than a copy of the commands, so a reward edited after the event still pays out what events.yml says now. If the event has been removed from the file in the meantime, the pending reward is dropped.
Stopping without paying
/event stop ends the running event and pays out. /event stop norewards ends it and pays nobody. A server shutdown in the middle of an event also ends it without paying, and saves what was scored. See Commands.
Console output
Every reason nobody is paid is said in the console, because a payout that quietly gives nothing looks the same as a broken plugin. A reward command the server does not have prints a warning naming the command. Reward commands are run through a quiet console by default so whatever they print does not flood the log, and a per reward line can be switched on while working out why something did not arrive. The three switches live under logging in Configuration.
Wins and stats
The winner of an event, or every member who scored on the winning island in a team event, has a win added to their stats. Everyone who scored has a participation added. /event stats shows both. See Commands.