Skip to main content

Levels Module

Leveling Mechanics​

  • Players earn experience (experience.kill) per kill and additional XP via experience.streaks-multiplier when reaching kill streak thresholds.
  • Total XP thresholds for each level are determined by the selected formula:
    • LINEAL: f(x) = a * x + b
    • QUADRATIC: f(x) = a _ x^2 + b _ x + c
    • EXPONENTIAL: f(x) = a * b^x + c
  • f(x) represents the total experience required to reach level x. The XP needed for the next level is f(x) - f(x-1).
  • Upon leveling, actions configured under each levels entry are executed.
  • If claim-only-last-level-reward is false, players receive rewards for every level gained in one go; if true, only the reward for the highest new level is granted.

Features​

  • Configure experience gains for kills and streaks
  • Choose level formula: LINEAL, QUADRATIC, or EXPONENTIAL
  • Define per-level rewards with color, prefix, broadcast, and actions
  • Control reward claims when multiple levels are gained at once

Configuration Reference​

KeyTypeDefaultDescription
enabledbooleantrueEnable or disable the levels module
max-levelnumber100Maximum level attainable
claim-only-last-level-rewardbooleantrueIf true, only grant the highest level's reward when leveling multiple levels at once
experience.killnumber100Experience awarded per player kill
experience.streaks-multiplierobject (number:number)Multipliers for experience based on kill streak counts
formula.calculator-type"LINEAL" | "QUADRATIC" | "EXPONENTIAL"LINEALFormula type for calculating experience-to-level mapping
formula.anumber300Parameter a in the level formula
formula.bnumber100Parameter b in the level formula
formula.cnumber1Parameter c in the level formula (only for QUADRATIC and EXPONENTIAL)
levelsobject[][]List of level definitions (level, color, prefix, broadcast, actions)

Example​

levels.yml
enabled: true
max-level: 100
claim-only-last-level-reward: true
experience:
kill: 100
streaks-multiplier:
5: 1.2
10: 1.5
15: 2.0
formula:
calculator-type: LINEAL
a: 300
b: 100
c: 1
levels:
- level: 1
color: "&a"
prefix: Noob
broadcast: true
actions:
- "broadcast: %player_name% reached level 1"
- level: 2
color: "&b"
prefix: Brave
broadcast: true
actions:
- "broadcast: %player_name% reached level 2"