-
Notifications
You must be signed in to change notification settings - Fork 25
Reward files
Reward files are located in a folder called Rewards in the plugins folder. They are rather simple to use, but allow endless possibilities.
Basically, you put what kind of rewards you want in them (Like money, commands, items, and more). After that the reward file is complete and can be used where ever it needs to be. When using it you list the file name without the ".yml".
So the reward file "Test.yml" should be listed as "Test". When the reward is executed it checks all conditions (Chance, Permission, Online/Offline, World). If the conditions are met the reward file is executed.
You can have it delay when to give the file, so this means you could have one file add a user permssion and one that removes it x minutes later.
There is also things like Randomly pick a reward file, so when the reward file is executed it can randomly pick a reward with a fallback list (If chance is unlucky).
The possibilities are endless! You can see a good breakdown of the possibilities below.
Please note in the actual reward file you can simply delete the lines of stuff you don't want, so just have the actual rewards you want (E.g. Just one line stating the money to give and that's it, no need to worry about other lines)
- Permission
- World
- Chance
- Online/Offline (Reward type)
- Javascript (true return)
- VaultGroup
- RewardExpiration (Reward has to be claimed within a certain amount of time)
- Server
- LocationDistance (Be within a certain distance of a location)
- Items (with random item amounts possible)
- Money (with random money amounts possible)
- Commands
- Potion Effects
- Title
- BossBar (1.9+)
- ActionBar
- Sound
- Particle Effect
- Custom Message
- Broadcast
- Firework
- Randomly pick a reward file to give on chance, Also option if chance is unlucky give fallback reward
- Delay when to run reward file (useful for giving players permission, then removing x hours later)
- Run reward file at specific time
- Javascript: Give reward if expression is true or false
- Javascripts: execute javascript
- Choice Rewards
- Javascript anywhere (in commands and such)
- Priority System
- SpecialChance
- Repeat Rewards
See ExampleBasic or ExampleAdvanced for examples on the above!