Rewards (v2.0.0+) - English

Rewards for v2.0.0+

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 must have the 'all:' root node and one scenario set, for example:

all:
  My First scenario:

The rewards part is part of a scenario :

all:
  My First scenario:
    rewards:

After the 'rewards:' node you set some reward using available reward.

Messages

rewards:
  [...]
  message:
    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)
    message:
      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 message part works normally except that you can use the variable %amount% if you want to use the amount inside.

Permission

rewards:
  [...]
  perm:
  - +[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:
  [...]
  group:
  - +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

Item

rewards:
  [...]
  item:
  - '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 :

enchantIdmultiplierMaxname
Armor
04Protection [1/3/4]
14Fire protection [0/3/4]
34Blast protection [0/1/4]
44Projectile protection [0/1/3]
Boots
24Feather falling
Helms
53Respiration
61Aqua affinity
Swords
165Sharpness [18/17]
175Smite [16/18]
185Bane of arthropods [16/17]
192Knockback
202Fire aspect
213Looting
Pickaxes, Axes, Spades - No hoes/rods
325Efficiency
331Silk touch
343Unbreaking
353Fortune
Bows
485Power
492Punch
501Flame
511Infinity

lotteryItem

rewards:
  [...]  
  lotteryItem:    
    probability: 5
    item:
    - '268'
    - '269'
    - '270'
    message:
      mp:
      - '&7&3LotteryItem, are you lucky ?'

The lotteryItem 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 item part works like the normal item part with quantity and enchantment.
The message part works like the normal messages part but it's launched after the lottery.

luckyItem

rewards:
  [...]
  luckyItem:
    item:
    - '260'
    - '297'
    - '366'
    - '278:1:35:3'
    message:
      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 item part works like the normal item part with quantity and enchantment.
The message part works like the normal message part but it's launched at the end.

luckyKit

rewards:
  [...]
  luckyKit:
    item:
    - '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'
    message:
      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 item part works like the normal item part with quantity and enchantment.
The message part works like the normal message part.

Command

rewards:
  [...]
  command:
  - '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%



Complete example with all rewards available

all:
  My First scenario:
    rewards:
      message:
        mp:
        - '&3One private message'
        broadcast:
        - '&3One message on public chat'
        log:
        - 'Log this message in console'
      money:
        sender: boozaa
        amount: 200
      lotteryMoney:
        probability: 1
        amount: 100
        sender: 'johnny' (optional)
        message:
          broadcast:
          - 'We have a lucky player, %player% win %amount%'
          mp:
          - 'Luck, you win %amount%'
      perm:
      - +[Base]boo.perms.perm1
      - +[Liberty]boo.perms.perm2
      group:
      - +jumper
      - -default
      item:
      - '363'
      - '260:5'
      - '278:1:35:3'
      - '35/14'
      lotteryItem:    
        probability: 5
        item:
        - '268'
        - '269'
        - '270'
        message:
          mp:
          - '&7&3LotteryItem, are you lucky ?'
      luckyItem:
        item:
        - '260'
        - '297'
        - '366'
        - '278:1:35:3'
        message:
          mp:
          - '&3Tirage au sort, que le hasard decide'
          broadcast:
          - '&5Tirage au sort ... %player% tente sa chance'
          log:
          - 'Lottery for %player%'
      luckyKit:
        item:
        - '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'
        message:
          mp:
          - '&bBravo tu as gagné le kit %item%'
      command:
      - 'broadcast hello %player% on level %power%. You reach the %skillName% level %skillLevel%'

Comments

Posts Quoted:
Reply
Clear All Quotes