Updated 25 October 2026. Facts on this page come from minecraft.wiki, minecraft.net and the live Artemis PvP server; sources are listed at the bottom.

Minecraft /xp Command: Give Yourself Levels
Type /xp add @s 30 levels on Java or /xp 30L @s on Bedrock to get 30 experience levels, enough for the best enchanting table roll. /xp (also /experience on Java) adds, sets or checks experience in levels or points, and needs cheats or operator rights.
How does /xp work?
| Task | Java | Bedrock |
|---|---|---|
| Add levels | /xp add @s 30 levels | /xp 30L @s |
| Add points | /xp add @s 100 | /xp 100 @s |
| Set levels | /xp set @s 0 levels | Not available; remove with a big negative number |
| Remove levels | /xp add @s -5 levels | /xp -5L @s |
| Check | /xp query @s levels | Not available |
To wipe every player's levels, Java uses /xp set @a 0 levels and Bedrock /xp -2147483648L @a. Points must be zero or more on Java when you set them.
What is the difference between levels and points?
Points are the raw orbs you collect; levels are the number on your bar. Each level needs more points than the last, so 100 points is several levels at the start but only part of one at level 30. Adding levels keeps your bar's progress the same. Full details: experience and XP.
How many levels do you need?
- 30 levels unlock the best enchanting table offer (with 15 bookshelves); see enchanting.
- Anvils refuse a job that costs 40 levels or more in survival ("Too Expensive!"); see anvils.
- Mending repairs gear with the points you pick up, which is why XP bottles and farms matter.
How do you get XP without commands?
Mine coal, diamonds, redstone and lapis, smelt items, breed animals, trade with villagers, fish, and kill mobs. A spawner farm gives the most; see XP bottles for the bottle trade.
What is XP used for on ArtemisPvP?
Frequently asked questions
How do you give yourself 30 levels?
Java: /xp add @s 30 levels. Bedrock: /xp 30L @s.
How do you reset XP to zero?
Java: /xp set @s 0 levels. Bedrock: /xp -2147483648L @s.
Sources
Every fact on this page was checked against these pages; the wording is ours.