Examples
Some use cases
I use [...] to demonstrate that it will be some others rewards in place.
Without conditions
Add a permission
On global level 100
When my players reached the global level 100 i want to add them the permission : essentials.help
So i create a yaml file named 100.yml in POWER/ONE with :
rewards: [...] perms: - +essentials.help [...]
On mining level 100
When my players reached the mining level 100 i want to add them the permission : essentials.help
So i create a yaml file named 100.yml in SKILLS/MINING/ONE with :
rewards: [...] perms: - +essentials.help [...]
Give money
On global level 100
I want to give them a money bonus of 500 from my own account
So i create a yaml file named 100.yml in POWER/ONE with :
rewards: [...] money: sender: boozaa amount: 500 [...]
I want to give them a magical money bonus of 500
So i create a yaml file named 100.yml in POWER/ONE with :
rewards: [...] money: amount: 500 [...]
On mining level 100
I want to give them a money bonus of 500 from my own account
So i create a yaml file named 100.yml in SKILLS/MINING/ONE with :
rewards: [...] money: sender: boozaa amount: 500 [...]
I want to give them a magical money bonus of 500
So i create a yaml file named 100.yml in SKILLS/MINING/ONE with :
rewards: [...] money: amount: 500 [...]
Everytime the player gains 5 global level
I want to give them a money bonus of 500 from my own account
So i create a yaml file named 5.yml in POWER/EVERY with :
rewards: [...] money: sender: boozaa amount: 500 [...]
I want to give them a magical money bonus of 500
So i create a yaml file named 5.yml in POWER/EVERY with :
rewards: [...] money: amount: 500 [...]
Everytime the player gains 5 mining level
I want to give them a money bonus of 500 from my own account
So i create a yaml file named 5.yml in SKILLS/MINING/EVERY with :
rewards: [...] money: sender: boozaa amount: 500 [...]
I want to give them a magical money bonus of 500
So i create a yaml file named 5.yml in SKILLS/MINING/EVERY with :
rewards: [...] money: amount: 500 [...]
Give items
Items
I want to give the player 1 bread and 1 apple.
rewards: [...] items: - '297' - '260' [...]
Now the player gain 1 bread and 1 apple.
Add a lotteryItems
The lotteryItems is like a roll of the dice for each item listed.
The number of dice faces is fixed in your config.yml.
probability is the number of chances the player has to gain the item.
I want to give 1 chance on 100 to the player to gain a special item:
- i set the parameter diceFaces to 100 in the config.yml
- i use the probability set to 1
rewards: [...] lotteryItems: probability: 1 items: - '278:1:35:3' messages: mp: - '&7&3LotteryItems, are you lucky ?' [...]
Now the player has 1 chance on 100 to gain an enchanted Diamond Pickaxe
Add a luckyItem
The luckyItem is a lucky bonus item.
The player win one of the listed items in random
rewards: [...] luckyItem: items: - '260' - '297' - '366' - '278:1:35:3' messages: mp: - '&3Tirage au sort, que le hasard decide' broadcast: - '&5Tirage au sort ... %player% tente sa chance' log: - 'Lottery for %player%' [...]
Now the player win one of those listed items and only one at random.
Remove a permission
Now when they reached the global level 200 i want to remove them the permission : essentials.help
So i create a yaml file named 200.yml in POWER/ONE with :
rewards: [...] perms: - -essentials.help [...]
With conditions
conditions: group: - +Red rewards: items: - '35/14' - '278:1:35:3' messages: mp: - 'Congrats' - 'You win a &3red wool &fand an &benchanted pickaxe'
So if player who level up is on the group "Red" the rewards part is launch so:
- he win a 35/14 (red wool) and 278:1:35:3 (enchanted pickaxe)
- a private message is sent 'Congrats, you win a &3red wool'
If player is not on group "Red" the rewards part is not launch so nothing happen.
If you want to add on the reward part a "lotteryItems", "luckyItems" or a "luckyKit" you can add a dédicated message part on them :
conditions: group: - +Red rewards: luckyItem: items: - '260' - '297' - '366' - '278:1:35:3' messages: mp: - '&3A lucky item for you : %item%' broadcast: - '&5A lucky item started for %player%, he win %item%' log: - 'Lottery for %player% -> %item%' items: - '35/14' - '278:1:35:3' messages: mp: - 'Congrats' - 'You win a &3red wool &fand an &benchanted pickaxe'
If the player is on group "Red" :
- he win a 35/14 (red wool) and 278:1:35:3 (enchanted pickaxe)
- he received a private message "Congrats" and "You win a &3red wool &fand an &benchanted pickaxe"
- he must win one item from the luckyitem items list and received a private message "&3A lucky item for you : %item%" where %player% and %item% are replaced with his nickname and the name of the item won.
On the dedicated message part from the 'luckyitem' part i added a 'broadcast' and a 'log' message so :
- a broadcast message is sent for all players in the server "&5A lucky item started for %player%, he win %item%"
- a log message is sent to console "Lottery for %player% -> %item%"
If player is not on group "Red" the rewards part is not launch so nothing happen.