Rewards - BenCodez/VotingPlugin GitHub Wiki
here.
For everything that reward files can do can be seenYou can do any of the following for any rewards defined within the plugin (even for some GUI's), reward files don't need to be used, it's just part of the system to allow more complex rewards. You can configure advanced rewards without reward files.
You can configure ingame with /av gui as shown in this video here: https://www.youtube.com/watch?v=EUX43nQtisU
Not sure where to set rewards? Where to set rewards
Rewards are defined usually under the Rewards Section
(Some other text can replace the Rewards test in some places, i.e. FirstVote, EverySiteReward, AllSites, etc):
Rewards:
# rewards
AllSites: #Specific example in SpecialRewards.yml
# rewards
# Possible to also chain rewards
Rewards:
# main reward
Rewards:
# sub reward
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
To disable rewards put Rewards: []
or Rewards: {}
Also note that using the above method may generate a file in Rewards/DirectlyDefined, DO NOT EDIT THIS FILE. It's used for offline rewards if needed
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)
%date% = Date of execution
%currentdate% = Current date
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 (reward file name is command)
Rewards:
- command
VotingPlugin/Rewards/command.yml:
Commands:
- 'command here'