Skip to content

Rewards

Ben edited this page Feb 3, 2021 · 32 revisions

For everything that reward files can do can be seen here.

You can only do any of the following for any rewards defined within the plugin, reward files are not mandatory:

Rewards are defined usually under the Rewards Section (Some other text can replace the Rewards test in some places, i.e. FirstVote, EverySiteReward, etc):

Rewards:

Directly define rewards (Recommended, no reward files required):

Rewards:
  Money: 100
  Commands:
  - 'say %player%'
  # Anything that reward files can do can be done here
  # This auto converts into a reward file automatically
  # Items, etc
  # See ExampleBasic or ExamapleAdvanced in VotingPlugin/Rewards for all possible configurations
  # Be sure to follow proper spacing

Directly listing reward files, avoid doing this unless you really need/want it, only a few cases where it's needed

Or you can either list rewards files (Files located in plugins/VotingPlugin/Rewards), like so:

Rewards:
- 'RewardFile1'
- 'RewardFile2'

Or have a reward file, like so:

Rewards: 'RewardFile1'

Placeholders (Use within rewards):

%player% = Player name
%money% = Money player got (With random number support)
%exp% = Exp player got (With random number support)
Also javascript support for text/messages (wiki page on the side)

Two different examples of doing the same reward (Directly defined vs reward files)

Directly defined:

Rewards:
  Commands:
  - 'command here'

Using reward files

Rewards:
- command

VotingPlugin/Rewards/command.yml:

  Commands:
  - 'command here'
Clone this wiki locally