Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Minecraft:Commands/xp

From SAS Gaming Wiki

Template:Infobox command Adds, removes or queries player experience.

Syntax

  • Java Edition
experience add <targets> <amount> [levels|points]
xp add <targets> <amount> [levels|points]
  • Increases or decreases experience amount or experience level.
    • If experience amount, it is counted into the player's Score.
    • If experience level, it is not counted into the player's score. The amount of experience points in the current experience bar is scaled proportionally, keeping the progress of experience bar unchanged.
experience set <targets> <amount> [levels|points]
xp set <targets> <amount> [levels|points]
  • Setting experience amount or experience level. Does not change the player's score.
    • If setting experience amount, the experience level is not changed. If the specified amount is greater than or equal to the remaining capacity of a player's current experience bar, the setting does not work for the player.
    • If setting experience level, the amount of experience points in the current experience bar is scaled proportionally, keeping the progress of experience bar unchanged.
experience query <targets> (levels|points)
xp query <targets> (levels|points)
  • Queries experience level or the experience amount in the current experience bar.
  • Bedrock Edition
xp <amount: int> [player: target]
  • Increases experience amount.
xp <amount: int>L [player: target]
  • Increases or decreases experience level. The amount of experience points in the current experience bar is scaled proportionally, keeping the progress of experience bar unchanged.

Arguments

Template:El: Template:Argument (in add mode)

Specifies the amount of experience points or levels to give to the player. Negative values remove experience instead of adding them.
Template:Arg desc

Template:El: Template:Argument (in set mode)

Specifies the amount of experience points or levels to be set to the player.
Template:Arg desc

Template:El: Template:Argument

Specifies the amount of experience points or levels to be added to the player. This amount may represent either an amount of points or an amount of levels.
If an L is added to the end, adds levels. Negative values remove experience instead of adding them.
Template:Arg desc If the amount is expressed in points, it must be not lower than 0.

Template:El: Template:Argument (in add and set mode)
Template:El: Template:Argument

Specifies the target of the command. Template:IN, if not specified, defaults to the command's executor.
Template:Arg desc

Template:El: Template:Argument (in query mode)

Specifies the target of the command.
Template:Arg desc

Result

Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table Template:Result table

Output

Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table Template:Output table

Examples

History

Java Edition

Template:HistoryTable

Bedrock Edition

Template:HistoryTable

External links

Navigation

Template:Navbox commands

de:Befehl/experience es:Comandos/xp ja:コマンド/experience pt:Comandos/xp ru:Команды консоли/experience th:คำสั่ง/experience uk:Команди консолі/xp zh:命令/experience