TimedTopper
The documentation for TimedTopper, a Spigot plugin for timely leaderboards.
Where to find the plugin:
The documentation for TimedTopper, a Spigot plugin for timely leaderboards.
Where to find the plugin:
# The type of storage the plugin will use to store the value
# Available: YAML, SQLITE, MYSQL
storage-type: yaml
# The settings for each holder
holders:
jump_daily:
top: jump
cron: DAILY
rewards:
?:
- give {name} stone 1
1:
- give {name} diamond 1
- say {name} got a diamond for jumping the most
2:
- give {name} iron 1
- say {name} got iron for jumping the second most
task:
save:
# How many entries should be saved per tick
entry-per-tick: 10
# How many ticks should the plugin wait before saving the leaderboard
delay: 0
This will guide you to set up a Timed Holder
First, you add some settings to link a Top Holder to this Timed Holder, which means the Timed Holder will listen to the Top Holder for value changes and updates.
holders:
jump_daily: # The timed holder name
top: jump # The top holder it will be based on
This example will set that the Timed Holder jump_daily
will listen to the Top Holder jump
(Click here if you don’t know what jump
is).
Continue reading to learn how to set up time settings.
Now you will set the duration of the Timed Holder. When the duration of the Timed Holder is over, the holder will be reset.
cron: <cron-expression>
The cron
is a QUARTZ expression, which is usually an expression with 7 parts.
You can go to this page to generate your own cron
expression.
The plugin provides some built-in cron
expressions in case you don’t want to make the expression yourself:
HOURLY
: The holder would be reset at the start of the next hourDAILY
: The holder would be reset at the start of the next dayWEEKLY
: The holder would be reset at the start of the next weekMONTHLY
: The holder would be reset at the start of the next monthYEARLY
: The holder would be reset at the start of the next yearholders:
# The holder that resets every day
jump_daily:
top: jump
cron: DAILY
# The holder that resets every month
jump_monthly:
top: jump
cron: MONTHLY
# The holder that resets every half of the month
jump_custom_time:
top: jump
cron: 0 0 0 1,15 * ? *
Now you will set the rewards to give to the players when the Timed Holder is reset.
rewards:
?: # Rewards for all players in the holder
- "command_1"
- "command_2"
- ...
1: # Rewards for the 1st player
- "command_1"
- "command_2"
- ...
2: # Rewards for the 2nd player
- "command_1"
- "command_2"
- ...
3: # Rewards for the 3rd player
- "command_1"
- "command_2"
- ...
4: # Rewards for the 4th player
- "command_1"
- "command_2"
- ...
<more ranks>
?
, 1
, 2
, 3
, etc. are optional. You don’t have to set all of them.
The plugin provides some variables to apply in the reward commands
{name}
: The name of the player{uuid}
: The UUID of the player{rank}
: The rank of the player, starts from 1{initial}
: The initial value of the player in the holder{current}
: The current value of the player in the holder{value}
: The value of the player in the holder - The distance between {initial}
and {current}
holders:
jump_daily:
top: jump
cron: DAILY
rewards:
?:
- give {name} stone 1
1:
- give {name} diamond 1
- say {name} got a diamond for jumping the most
2:
- give {name} iron 1
- say {name} got iron for jumping the second most
The query system is the same as the one used in Topper, with the addition that the <holder>
is the name of the Holder speficied in the configuration file of TimedTopper.
Refer to the Topper Query page for more information.
Type | Argument | Description | Example | Explanation |
---|---|---|---|---|
remain_time | The remaining time in millis until the next reset. | money;remain_time | Retrieve the remaining time in millis until the next reset of the Holder named money | |
remain_time | <format> | The remaining time until the next reset. | money;remain_time;HH:mm:ss | Retrieve the remaining time until the next reset of the Holder named money |
end_time | The time of the next reset in epoch millis. | money;end_time | Retrieve the time of the next reset in epoch millis of the Holder named money | |
end_time | <format> | The time of the next reset. | money;end_time;yyyy-MM-dd HH:mm:ss | Retrieve the time of the next reset of the Holder named money |
Details about the hooks provided by the plugin.
The plugin provides a PlaceholderAPI placeholder to allow you to query data from the Holder.
%timedtopper_<query>%
Check the Query section for more information about how to set the <query>
.
%timedtopper_money;top_name;1%
%timedtopper_money;top_value;1%
%timedtopper_money;top_value;1;#,###%
%timedtopper_money;top_rank%
%timedtopper_money;remain_time;HH:mm:ss%
%timedtopper_money;end_time;yyyy-MM-dd HH:mm:ss%