Beginner · 1 block

Five-level XP reward button

Bedrock-only use case: press a button to give 5 experience levels to the nearest player.

Choose in-game screen
Bedrock Edition
Bedrock Edition (stable)

What you need

Before placing the blocks

  • 1 Command Block
  • 1 button
  • Place the button where your map rules allow players to claim it

Expected result

Test after setup

The player nearest the Command Block receives 5 additional experience levels.

Configure one block at a time

Open the game and match these values

The copy button copies only Command Input. Choose every other value in the Command Block screen.

1

Reward block — add 5 levels

Attach a button to the Impulse Block. The recipient should be the nearest player when it is pressed.

Command Block
Reward block — add 5 levels
Impulse
Unconditional
Needs Redstone
0
xp 5L @p
Previous Output
-
Block Type:
Impulse
Condition:
Unconditional
Redstone:
Needs Redstone

Bedrock marks the unit as levels by appending L to the amount, so the command is generated in that form

If it does not work

Check these four things first

  1. Cheats are enabled and you have Operator permission
  2. Needs Redstone or Always Active matches the example
  3. Chain Block arrows face the same direction and follow the previous block
  4. Read Previous Output to find the command that failed
Read the Command Block basics