Rewards
The [...] means that there can be code in this place, do not type that in your yaml files...
The rewards part is a part of your yaml reward file.
For example you want to reward the player at MINING level 250 you create the file SKILLS/MINING/ONE/250.yml.
Inside this file you set a reward part with :
rewards:
After the 'rewards:' node you set some reward using available reward.
Messages
rewards: [...] messages: mp: - '&3One private message' broadcast: - '&3One message on public chat' log: - 'Log this message in console'
- mp -> a list of private messages for the player
- broadcast -> a list of messages to broadcast
- log -> a list of messages to log in console
Money
rewards: [...] money: sender: boozaa amount: 200
- sender -> who must pay (optional)
- amount -> how much
lotteryMoney
rewards: lotteryMoney: probability: 1 amount: 100 sender: 'johnny' (optional) messages: broadcast: - 'We have a lucky player, %player% win %amount%' mp: - 'Luck, you win %amount%'
- probability -> number of chance
- amount -> how much
- sender -> who pay? (optional)
The messages part works normally except that you can use the variable %amount% if you want to use the amount inside.
Permissions
rewards: [...] perms: - +[Base]boo.perms.perm1 - +[Liberty]boo.perms.perm2
You must indicate '-' to remove a permission or '+' to add one.
- -[Base]boo.perms.perm1 -> remove permission boo.perms.perm1 for World named Base
- +[Liberty]boo.perms.perm2 -> add permission boo.perms.perm2 for World named Liberty
- +boo.perms.perm3 -> add permission boo.perms.perm3 to player
- -boo.perms.perm4 -> remove permission boo.perms.perm4 to player
Group
rewards: [...] groups: - +jumper - -default
You must indicate '-' to remove the player from a group or '+' to added to one.
- -default -> remove player from group default
- +jumper -> add player on group jumper
Items
rewards: [...] items: - '363' - '260:5' - '278:1:35:3' - '35/14'
Every item to give has this structure :
itemId/Damage:quantity:enchantId:multiplier
- So in the example
- '363' -> give one Raw Beef
- '260:5' -> give 5x Apple
- '278:1:35:3' -> give an echant Diamond Pickaxe
- '35/14' -> give 1 x Red Wool
For the enchantment part you must use this reference :
enchantId | multiplierMax | name |
---|---|---|
Armor | ||
0 | 4 | Protection [1/3/4] |
1 | 4 | Fire protection [0/3/4] |
3 | 4 | Blast protection [0/1/4] |
4 | 4 | Projectile protection [0/1/3] |
Boots | ||
2 | 4 | Feather falling |
Helms | ||
5 | 3 | Respiration |
6 | 1 | Aqua affinity |
Swords | ||
16 | 5 | Sharpness [18/17] |
17 | 5 | Smite [16/18] |
18 | 5 | Bane of arthropods [16/17] |
19 | 2 | Knockback |
20 | 2 | Fire aspect |
21 | 3 | Looting |
Pickaxes, Axes, Spades - No hoes/rods | ||
32 | 5 | Efficiency |
33 | 1 | Silk touch |
34 | 3 | Unbreaking |
35 | 3 | Fortune |
Bows | ||
48 | 5 | Power |
49 | 2 | Punch |
50 | 1 | Flame |
51 | 1 | Infinity |
lotteryItems
rewards: [...] lotteryItems: probability: 5 items: - '268' - '269' - '270' messages: mp: - '&7&3LotteryItems, are you lucky ?'
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 have to gain the item.
If you set more than one item the lottery start for each item listed with same probability fixed.
The items part works like the normal items part with quantity and enchantment.
The messages part works like the normal messages part but it's launched after the lottery.
luckyItems
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%'
The luckyItem is a lucky bonus item.
The player have to win one of the listed items but in random
The items part works like the normal items part with quantity and enchantment.
The messages part works like the normal messages part but it's launched at the end.
luckyKit
rewards: [...] luckyKit: items: - '298:1:1:4|299:1:1:4|300:1:1:4|301:1:1:4' - '306:1:1:4|307:1:1:4|308:1:1:4|309:1:1:4' - '310:1:1:4|311:1:1:4|312:1:1:4|313:1:1:4' messages: mp: - '&bBravo tu as gagné le kit %item%'
The luckyKit a lucky bonus kit of items.
The player have to win one of the listed kit of items but in random
You must separate each item by a '|'
The items part works like the normal items part with quantity and enchantment.
The messages part works like the normal messages part.
Commands
rewards: [...] commands: - 'broadcast hello %player% on level %power%. You reach the %skillName% level %skillLevel%, on World %worldName% at location %XLoc%, %YLoc%, %ZLoc%'
For sending console commands.
You can use replaced string like for messages sections:
%player%
%power%
%skillName%
%skillLevel%
%XLoc%
%YLoc%
%ZLoc%
%worldName%
Comments