How do I test for a player's xp levels in a radius of 2?

How do I test for a player's xp levels in a radius of 2? - Student Cheating During an Exam

I have the command

/give @p[lm=10] bow

set up in one command and

/xp -10L @p[lm=10] in another.

I need to know how to make the second command apply to only players in a specific radius.



Best Answer

It should just be /xp -10L @p[lm=10,r=X] where X is the number of blocks in the radius.




Pictures about "How do I test for a player's xp levels in a radius of 2?"

How do I test for a player's xp levels in a radius of 2? - Student Getting A+ Mark in Her Exam
How do I test for a player's xp levels in a radius of 2? - Person Drawing a Circle on a Calendar
How do I test for a player's xp levels in a radius of 2? - Person Aspirating the Vaccine from the Vial



How do you test for radius in a player?

2. Type the Command
  • Test if Players are within 10 blocks. In this example, we will test to see if there are any players within a 10 block radius with the following command: /testfor @a[r=10] ...
  • Test if Mooshrooms are within 50 blocks. ...
  • Test if Nearest Player is at Level 20 experience.


  • How do you test if a player is in a certain area Minecraft?

    In this command, you testfor the nearest player with a score, on the objective "objname", of 3. This player would have to be on the red team. If you attach this command block to a clock, and put a comparator on the side of it, whenever it finds a player, it will output a redstone signal.

    How does the Testfor command work?

    Minecraft Exp modifier command Gives the targeted player an amount of experience points. If you just want to add levels instead, which is easier for enchanting, try \u201c/xp <amount>L [player]\u201d.



    How To Test Your Game With 2 Players In Roblox 2021




    Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

    Images: RODNAE Productions, RODNAE Productions, Artem Podrez, Artem Podrez