rewards
Per-position commands and messages for the points leaderboard, plus optional rewards per board.
When a period ends, the rewards block decides what the top players
receive. A reward is a list of console commands plus one message, per
position.
There are two separate reward tables: one for the points leaderboard, which is the overall ranking across every board, and an optional one for individual boards.
Quick example
rewards:
enabled: true
points-leaderboard:
1:
commands:
- "eco give %player% 5000"
- "lp user %player% parent addtemp champion 30d"
message: "<#4DA6E8>You placed <#E0F0FF>#1<#4DA6E8> on the points leaderboard!"
2:
commands:
- "eco give %player% 4000"
message: "<#4DA6E8>You placed <#E0F0FF>#2<#4DA6E8> on the points leaderboard!"
board-rewards:
ores-mined:
1:
commands:
- "give %player% diamond_pickaxe 1"
message: "<#4DA6E8>Top miner! Enjoy a diamond pickaxe."Reference
| Key | Type | Default | Notes |
|---|---|---|---|
enabled | boolean | true | Master switch for both tables. |
points-leaderboard.<n>.commands | list | Console commands for position <n> on the points leaderboard. | |
points-leaderboard.<n>.message | string | MiniMessage line for that player. | |
board-rewards.<board>.<n>.commands | list | Same, for position <n> on one board. <board> is the board's id. | |
board-rewards.<board>.<n>.message | string | Same. |
The shipped file pays positions 1 to 10 on the points leaderboard and
has board-rewards commented out. A position you do not list gets
nothing. Board rewards are paid on top of the points rewards, they
do not replace them.
A board can only pay as many positions as it holds, which is
general.leaderboard-size (10 by default). A board-rewards entry
for a board that does not exist or is disabled is skipped with a
warning in console.
Placeholders
%player% in commands is replaced with the player's name. That is
the only placeholder: there is no %position%, %board% or
%value%, and PlaceholderAPI tokens are not resolved. Write the
position into the text yourself, as the shipped messages do.
The message is sent as written, behind the plugin prefix. Nothing is
replaced in it.
Offline winners
A winner who is offline when the period ends still gets their
commands: they are stored and run the next time that player joins.
The message is not stored. It is only shown to winners who are
online at the moment of the reset.
So put anything the player must not miss into a command, for example
a mail or a tellraw scheduled by another plugin, rather than into
message.
When rewards are paid
Once per period, right when it ends, from the standings of the period that just finished. See monthly and Monthly reset explained for the timing, and for what happens when the server was offline at that moment.