/experience
Adds, sets, or queries experience points or levels for one or more players. Identical to /xp.
Syntax
/experience <add|set|query> <targets> <amount> [levels|points]Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| action | literal | Required | The action to perform: add, set, or query. |
| targets | entity | Required | The player(s) to modify. |
| amount | integer | Required | The amount of experience. Omitted when action is query. |
| unit | literal | Optional | Whether the amount refers to levels or points. Defaults to points. |
Examples
/experience add @s 10 levelsAdds 10 experience levels to yourself.
/experience set @p 0 levelsResets the nearest player's level to 0.
/experience query @s pointsDisplays your current experience points within the current level.
Common Mistakes
- Trying to set points to a value higher than the current level's maximum, the command will fail.
- Confusing this with Bedrock Edition syntax which uses a different format.
Notes
Introduced in 1.13 as the expanded version of /xp. Both commands remain available and behave identically.
Related Commands
Need a Minecraft server?
Try these commands on Astroworld or host your own server.
Try Astroworld Hosting