How to give experience to a player — the /xp command
Generator /xp
Give experience to a player — adjust the parameters and copy the finished result
The /xp command gives or takes experience from a player. You can give either experience points or whole levels. Useful for quickly gaining levels before enchanting.
Give experience to whom
The nearest player to the point where the command runs
Quantity
Type
Adds whole levels (enchanting requires levels)
Generated command
Paste it into the Minecraft chat (the T key) or a command block
Other commands
/give
Give an item to a player
/summon
Summon a mob or entity
/effect
Apply an effect to a player
/enchant
Enchant the item in hand
/gamemode
Change game mode
/tp
Teleport a player
/time
Change the time of day
/weather
Change the weather
/difficulty
Change world difficulty
/gamerule
Change world rules
/clear
Clear a player's inventory
/setblock
Place a block at coordinates
/fill
Fill an area with blocks
/spawnpoint
Set the spawn point
How does /xp work?
The /xp add command gives experience points or levels to a player. Syntax: /xp add <player> <amount> [points|levels]. By default experience points are given. To give levels, add levels at the end.
Points and levels
Experience points (points) fill the bar of the current level. Levels (levels) are added whole. Enchanting at a table requires levels, not points. The maximum level is 2,147,483,647.
Negative values
You can specify a negative amount to remove experience: /xp add @s -10 levels removes 10 levels. This is useful for creating experience-purchase systems on servers with command blocks.
Experience and enchanting
To enchant an item at an enchanting table you need levels: the maximum enchantments require 30 levels. You can quickly gain levels with /xp add @s 100 levels.
Looking for Minecraft server hosting?
Launch your server in a minute — one-click mod and plugin installation, DDoS protection, powerful hardware. Promo code PROMO10 gives 10% off any plan.
