Chapter 2

Holder

This will guide you to set up a Timed Holder

Subsections of Holder

Link a Top 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.

Set time interval

Now you will set the duration of the Timed Holder. When the duration of the Timed Holder is over, the holder will be reset.

Format

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.

Built-in

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 hour
  • DAILY: The holder would be reset at the start of the next day
  • WEEKLY: The holder would be reset at the start of the next week
  • MONTHLY: The holder would be reset at the start of the next month
  • YEARLY: The holder would be reset at the start of the next year

Example

holders:
  # 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 * ? *

Set up Reward

Now you will set the rewards to give to the players when the Timed Holder is reset.

Format

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.

Reward Variable

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}

Example

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