Levels Module
Leveling Mechanicsβ
- Players earn experience (
experience.kill) per kill and additional XP viaexperience.streaks-multiplierwhen 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 levelx. The XP needed for the next level isf(x) - f(x-1).- Upon leveling, actions configured under each
levelsentry are executed. - If
claim-only-last-level-rewardis 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β
| Key | Type | Default | Description |
|---|---|---|---|
| enabled | boolean | true | Enable or disable the levels module |
| max-level | number | 100 | Maximum level attainable |
| claim-only-last-level-reward | boolean | true | If true, only grant the highest level's reward when leveling multiple levels at once |
| experience.kill | number | 100 | Experience awarded per player kill |
| experience.streaks-multiplier | object (number:number) | Multipliers for experience based on kill streak counts | |
| formula.calculator-type | "LINEAL" | "QUADRATIC" | "EXPONENTIAL" | LINEAL | Formula type for calculating experience-to-level mapping |
| formula.a | number | 300 | Parameter a in the level formula |
| formula.b | number | 100 | Parameter b in the level formula |
| formula.c | number | 1 | Parameter c in the level formula (only for QUADRATIC and EXPONENTIAL) |
| levels | object[] | [] | 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"