Mcmmo Unofficial Docs
Guides

Level-Up Commands

Reward players automatically when they hit a skill level or power level milestone - run any server command, from a broadcast to a permission grant to a custom item.

Want players to get a diamond at Mining 50, a server-wide announcement at power level 1000, or a permission node unlocked at Herbalism 100? Level-up commands run any server command automatically the moment a player crosses a milestone you choose - no other plugin required.

New in mcMMO 2.3.000. On older versions this feature doesn't exist yet - update mcMMO and the file below will be generated for you on next startup.

Where it's configured

Everything lives in one file:

plugins/mcMMO/level_up_commands.yml

It ships with several ready-to-use example entries, all disabled by default. Copy one, tweak it, flip enabled to true, and restart the server (like every mcMMO config file, changes need a full restart).

Setting up your first reward

Each entry needs a commands list and a trigger - either a skill level, a power level, or both. Here's a simple one: give a diamond and announce it when someone hits Mining 50:

level_up_commands:
    mining_milestones:
        enabled: false
        skills: [ Mining, Excavation ]
        levels: [ 10, 50, 100 ]
        commands:
            - "say {@player} reached level {@level} in {@skill}!"
            - "give {@player} minecraft:diamond 1"

skills and commands accept either one value or a list, so this single entry actually covers six milestones (three levels × two skills). Commands are written without a leading slash, and run once per milestone even if a player gains several levels at once (e.g. through /addlevels).

Reward power level instead of a single skill

Power level is the sum of a player's skill levels - use power_levels on its own, no skills/levels needed:

level_up_commands:
    power_level_milestones:
        enabled: false
        power_levels: [ 500, 1000, 2000 ]
        commands:
            - "say {@player} has reached power level {@power_level}!"
            - "lp user {@player} permission set some.reward.node true"

An entry can combine both trigger types at once - it fires whenever either condition is met, so you can reward "any combat skill hits 50, or overall power hits 750" in one entry:

level_up_commands:
    combined_triggers:
        enabled: false
        skills: [ Swords, Axes ]
        levels: [ 50 ]
        power_levels: [ 750 ]
        commands:
            - "say {@player} reached a combat milestone! Swords: {@swords_level}, Axes: {@axes_level}, power level: {@power_level}"

Placeholders you can use

Drop these straight into any command string - no leading slash, no extra setup:

PlaceholderResolves to
{@player}The player's name.
{@skill}The skill that leveled up (skill triggers only).
{@level}The milestone level that was reached (skill triggers only).
{@power_level}The milestone power level for power_levels triggers, otherwise the player's current power level.
{@<skill>_level}The player's current level in that specific skill - works for every skill, e.g. {@mining_level}, {@herbalism_level}.

If PlaceholderAPI is installed, its placeholders - including mcMMO's own %mcmmo_…% ones and third-party expansions - also resolve against the leveling player:

level_up_commands:
    papi_examples:
        enabled: false
        skills: all
        levels: [ 500 ]
        commands:
            - "say {@player} hit {@skill} {@level} while exploring %player_world%!"
            - "say {@player} is now position %mcmmo_rank_mining% on the Mining leaderboard!"

%player_world% needs PlaceholderAPI's separate Player expansion downloaded; mcMMO's own %mcmmo_rank_mining% works out of the box.

Running the command as the player

By default commands run from CONSOLE, which bypasses permissions entirely - good for give, lp, or anything an admin could run. Set run_as: PLAYER to run it as the player instead, using their own permissions - handy for things like /me broadcasts:

level_up_commands:
    any_skill_mastery:
        enabled: false
        skills: all
        levels: [ 100 ]
        run_as: PLAYER
        commands:
            - "me just reached level {@level} in {@skill}!"

skills: all covers every skill in one entry - it fires whenever any skill hits the listed level(s), not just once total.

Sending a rich chat message

For something fancier than plain chat, run tellraw - it supports colors, bold text, and hover tooltips:

level_up_commands:
    fancy_message:
        enabled: false
        skills: all
        levels: [ 250 ]
        commands:
            - 'tellraw {@player} {"text":"","extra":[{"text":"Milestone! ","color":"gold","bold":true},{"text":"[{@skill} {@level}]","color":"aqua","underlined":true,"hover_event":{"action":"show_text","value":"Keep it up, {@player}! Power level: {@power_level}"}},{"text":" (hover for details)","color":"gray","italic":true}]}'

Minecraft versions before 1.21.5 use the older hoverEvent/contents JSON keys instead of hover_event/value shown above. Match the JSON format to your server's Minecraft version or the hover text won't show.

Reference

FieldRequiredMeaning
commandsYesOne command, or a list of commands, to run. No leading slash.
skillsOne of skills/power_levelsA skill name (e.g. Mining), a list, or all. Needs levels alongside it.
levelsWith skillsA list of skill levels that trigger the entry.
power_levelsOne of skills/power_levelsA list of power-level milestones. Works on its own, no skills/levels needed.
enabledNo (default true)Set false to keep an entry defined but inactive.
run_asNo (default CONSOLE)CONSOLE for admin-level commands; PLAYER to run as the leveling player, using their own permissions.

Power level only counts skills the player currently has permission for - see Permissions. Command text is passed to the server as-is; whether colors render depends on the command itself (tellraw supports them, plain say/broadcast don't). say and me show [Not Secure] in the console because they send unsigned player chat - that's vanilla behavior and harmless.

For developers

Other plugins can register their own level-up triggers or callbacks (and unregister them later) through LevelUpCommandAPI without touching this file. See the API reference.

On this page