Question: how to do xp command?
Answer: When you use the L attribute with the /xp command, you add experience levels to a player. An experience level is one entire bar filled. When you add an experience level, you will see the experience level counter for the player increase. Type the command in the chat window and press the Enter key to run the command.