Minecraft; How can you use command blocks to detect player levels? [duplicate]

Minecraft; How can you use command blocks to detect player levels? [duplicate] -

I'm trying to work on redstone works with a new adventure map, how can I make command blocks detect player levels? That's my main question, the rest I know how to work out but here's the purpose anyway, I'm trying to make a command block detect player levels and at a certain amount of levels an action will happen (yet to be decided) but I know how to do that, just use a comparator to link up to the next command block and continue out the line of commands needed.



Best Answer

This may help you.

Basically, you just need two tags : l= and lm=

l=is the maximum level, while lm=is the minimum level.

So if you want to detect people with 5 levels, do:

/testfor @a[l=5,lm=5]

Source: This question by (answer)aytimothy and FireStrike289




Pictures about "Minecraft; How can you use command blocks to detect player levels? [duplicate]"

Minecraft; How can you use command blocks to detect player levels? [duplicate] - Crop hacker silhouette typing on computer keyboard while hacking system
Minecraft; How can you use command blocks to detect player levels? [duplicate] - Focused ethnic female DJ playing music at nightclub
Minecraft; How can you use command blocks to detect player levels? [duplicate] - White Metal High-rise Viewing Deck Building



How do you see what level someone is on in Minecraft?

You can test for player's levels using the l= or lm= arguments in the target selector.

Is there a detect command in Minecraft?

detectPos is the x y z coordinate to detect the block. command is any Minecraft command that you want the entity to execute such as summon, give, fill, clone, setblock, tp, xp, kill, etc.

How do you Testfor with command blocks?

How to Enter 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 to detect a player using command blocks! | /execute command tutorial for 1.16 Minecraft Java




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

    Images: Geometric Photography, Anete Lusina, Fardad Postwala, Pixabay