Skip to content

rewards.yml

pustinek edited this page Nov 8, 2019 · 10 revisions

Rewards are defined in the rewards.yml file. Rewards give you the option to specify different kind of rewards that player can get when they vote. This file is highly customizable and every option is described bellow.

Options

Option Description
type Possible options are ONETIME | MONTHLY | ONVOTE | ANYTIME
claimable Should the reward be claimed via GUI ... true -> player has to claim it via GUI, false -> given to player on vote

Commands section

Placeholders that can be used in the commands section of a reward

Placeholder Description
{player} Player that will receive the award

If your server is using Vault economy, you have the ability to use money <amount> -> ex: money 1000 to give money to players

Requirements section

Placeholders that can be used in the requirements section of a reward

Placeholder Description
{votes.total} Player required votes received in total
{votes.month} Player required votes received in the current month
{votes.server.total} Votes acquired by the whole server
{votes.server.month} Player required votes received in the current month
{votes.points} Player voting points (points are removed on reward claim)

GUI section

Placeholders that can be used in the GUI section of a reward

Placeholder Description Return Value
{requirements.month} Monthly required votes to receive the reward integer
{requirements.total} Total required votes to receive the reward integer
{requirements.server.month} Monthly server votes required to receive the reward integer
{requirements.server.total} Total server votes required to receive the reward integer
{requirements.points} Player voting points required integer
{requirements.claimable} Are the requirements met and can be claimed ? string explaining
{votes.month} Player votes acquired this month integer
{votes.total} Player votes acquired in total integer
{votes.points} Player votes acquired in total integer
{config.claimable} is the reward claimable as set in the file true|false
{config.type} type of rewards ONVOTE | MONTHLY | ONETIME

Example of rewards.yml

rewards:
  basic_vote: #This line should be unique (id)
      enabled: true
      type: "ONVOTE"
      claimable: false
      requirements: []
      rewards:
        - "money 3000"
        - "message {player} You voted so you receive 2000 $"
      gui:
        name: "basic vote"
        material: DIAMOND
        enchanted: false
        lore:
          - "Vote on one of the websites to get the rewards"
          - "get the reward every time you vote"

Clone this wiki locally