EventPulse logoEventPulse

Rewards

Places, ranges and participation, loot entries, point rewards, what a reward block can give, and how offline winners are paid.

Every event carries its own rewards block in events.yml. When the event ends, the plugin ranks everyone who scored, announces the top places, and works through the block paying each place. Anyone who is offline at that moment has their reward parked and gets it on their next join.

How the ranking maps onto reward blocks: place 1, 2 and 3 each have their own block, places 4 to 10 share a range block written as 4-10, everyone who scored and was not paid a place falls under participation, a block only pays when the score clears its min-score, and anyone offline at the end has the reward parked until they next join.

Places

The key of each block says who it pays.

KeyWho gets it
"1", "2", "3" and so onThat one place
"4-10"Every place in the range, both ends included
participationEveryone who scored and was not paid a place above
rewards:
  "1":
    commands:
      - "eco give %player% 10000"
      - "crate give %player% vote 3"
    message: "&aYou won the Stone Rush with &f%score% &apoints."
  "2":
    commands:
      - "eco give %player% 5000"
  "4-10":
    commands:
      - "eco give %player% 500"
  participation:
    min-score: 50
    commands:
      - "eco give %player% 100"

A key that is not a number, a range or participation is skipped with a console warning naming it, and the rest of the block still loads. A block that gives nothing at all is skipped the same way.

What a block can give

Inside any place, any of these can be used and mixed. Each one is given on its own, so a command for a plugin the server does not have cannot stop the money, the items or the message that were meant to go with it.

KeyWhat it does
commandsA list of commands run from the console. %player%, %score%, %position%, %event% and %island% are filled in.
moneyAn amount paid through Vault. Needs Vault and an economy plugin, otherwise the console warns and nothing is paid.
itemsA list of items given straight into the inventory. Anything that does not fit drops at the player's feet.
messageA line sent to that player, with the same placeholders as the commands.
min-scoreThe lowest score needed before this place pays anything.

An item is written like this:

items:
  - material: DIAMOND_PICKAXE
    amount: 1
    name: "&bWinner's Pickaxe"
    lore:
      - "&7Won the Stone Rush"
    enchantments:
      EFFICIENCY: 5
      UNBREAKING: 3

An item or enchantment name the running version does not have is skipped with a warning, and the rest of the reward still goes.

Loot entries

Loot entries are used by objective.loot in a BARREL_CLAIM event and by the event-level point-rewards list. Each entry rolls its own chance out of 100 when the relevant objective is claimed or point is earned.

loot:
  - type: ITEM
    material: EMERALD
    amount: 1-3
    chance: 25.5
    name: "&aLucky Emerald"
    lore:
      - "&7Found in the barrel"
    enchantments:
      LUCK_OF_THE_SEA: 1
  - type: ITEMSADDER
    id: myitems:ruby
    amount: 1
    chance: 10
  - type: MYTHIC
    id: SkeletonKingSword
    chance: 1
  - type: COMMAND
    command: "eco give %player% 50"
    chance: 100
KeyWhat it doesDefault
typeITEM gives a Minecraft item, ITEMSADDER gives an ItemsAdder item, MYTHIC gives a MythicMobs item and COMMAND runs a console command.ITEM
materialThe Minecraft material for an ITEM entry.required for ITEM
idThe ItemsAdder or MythicMobs item id for ITEMSADDER or MYTHIC.required for those types
commandThe console command for a COMMAND entry. %player% is replaced with the recipient's name.required for COMMAND
amountA positive number or a range such as 1-3. A range rolls a whole number between its two ends. Only item entries use it.1
chanceThe chance for this entry to be given, out of 100, and decimals are allowed.100
nameOptional display name for item loot. Colour codes work.empty
loreOptional lore lines for item loot. Colour codes work.empty
enchantmentsOptional enchantment names and levels for item loot.empty

If ItemsAdder or MythicMobs is not available, entries using that dependency are skipped and one console line is written for that dependency per event. The other entries continue to roll.

Point rewards

point-rewards sits at event level, alongside rewards, and uses the same loot entry shape. It is rolled once for every whole point a player earns, rather than once at the end of the event.

point-rewards:
  - type: COMMAND
    command: "eco give %player% 5"
    chance: 100
  - type: ITEM
    material: DIAMOND
    amount: 1
    chance: 2.5

Fractional points add up, so two actions worth 0.5 each make one whole-point roll. An individual score update makes at most 64 rolls. Point rewards are separate from placement rewards under rewards: they happen while the score is being earned, while placement rewards are paid after the event ranks the players.

min-score

A place pays nothing to a score below its min-score. That stops a participation reward going to someone who broke one block, and stops third place being paid to a score of two on a quiet night. In a team event the number that has to clear it is the island total shown on the ranking line, not one member's own share. See Team mode.

Minimum participants

event-defaults:
  min-participants: 3

When fewer players than this scored, nobody is paid at all, the event.not-enough-players message goes out with the count and the number needed, and the console names the key. It counts players who scored, not players online. The shipped default is 3, which is the most likely reason a small test pays nothing, so set it to 0 while testing alone.

Offline winners

A winner who is offline at the end has the reward stored in the database along with the place and the score. On their next join they are told something is waiting, and /event claim hands everything over. The stored reward remembers the place key rather than a copy of the commands, so a reward edited after the event still pays out what events.yml says now. If the event has been removed from the file in the meantime, the pending reward is dropped.

Stopping without paying

/event stop ends the running event and pays out. /event stop norewards ends it and pays nobody. A server shutdown in the middle of an event also ends it without paying, and saves what was scored. See Commands.

Console output

Every reason nobody is paid is said in the console, because a payout that quietly gives nothing looks the same as a broken plugin. A reward command the server does not have prints a warning naming the command. Reward commands are run through a quiet console by default so whatever they print does not flood the log, and a per reward line can be switched on while working out why something did not arrive. The three switches live under logging in Configuration.

Wins and stats

The winner of an event, or every member who scored on the winning island in a team event, has a win added to their stats. Everyone who scored has a participation added. /event stats shows both. See Commands.

On this page