Minecraft command block not outputting for /testfor command [duplicate]
My problem is what the title specifies. I'm creating an adventure map with an xp store. I have a series of command blocks which check for the proper xp level, take away the cost of the item and give the player that item. however when I go to check my xp level with /testfor, the command block doesn't output anything. instead it tells me
[19:54:57] /testfor < player>
The command I put in was /testfor @p [lm=5]
I tried moving [lm=5] so it was right beside the @p, but Minecraft told me it can't find the player. I also tried putting my playername in, but I got the same output from before. Is there something I'm missing here?
Best Answer
Target selector parameters must be placed directly next to the selector, with no space between them. "lm" stands for "level minimum", and it if's telling you it can't find the player, that means no player with 5 XP levels or more was found.
The correct command is:
/testfor @p[lm=5]
Also note that selector parameters can only be used with a selector. Using playername[lm=5] is invalid syntax. To check for a specific player along with parameters, you must use the name parameter:
/testfor @p[name=playername,lm=5]
Pictures about "Minecraft command block not outputting for /testfor command [duplicate]"
![Minecraft command block not outputting for /testfor command [duplicate] - Side view of young woman in hoodie sitting on floor near sofa and playing with obedient brown Labrador while resting during free time Minecraft command block not outputting for /testfor command [duplicate] - Side view of young woman in hoodie sitting on floor near sofa and playing with obedient brown Labrador while resting during free time](/assets/images/minecraft_command_block_not_outputting_for_testfor_command_duplicate_1.jpeg)
![Minecraft command block not outputting for /testfor command [duplicate] - Crop hacker silhouette typing on computer keyboard while hacking system Minecraft command block not outputting for /testfor command [duplicate] - Crop hacker silhouette typing on computer keyboard while hacking system](/assets/images/minecraft_command_block_not_outputting_for_testfor_command_duplicate_2.jpeg)
![Minecraft command block not outputting for /testfor command [duplicate] - Full body optimistic young female with curly hair smiling and teaching Beagle dog beg command on sunny summer day in countryside Minecraft command block not outputting for /testfor command [duplicate] - Full body optimistic young female with curly hair smiling and teaching Beagle dog beg command on sunny summer day in countryside](/assets/images/minecraft_command_block_not_outputting_for_testfor_command_duplicate_3.jpeg)
How do you activate a repeated command block?
To get a repeating command block, players must use the /give command like so: /give @p minecraft:repeating_command_block <amount> . Players can also change a normal command block into a repeating command block by selecting the option in the command block GUI.How do you Testfor with command blocks?
How to Enter the CommandWhat replaced the Testfor command in Minecraft?
The /testfor command became obsolete in Minecraft 1.13, and has been replaced by the /execute command*. It will do the same as typing /testfor @e {SelectedItem:{id:"<item>"}} and then putting a comparator to the command block with the command, and then running the command which you wanna run.Learn Command Blocks (Ep 2): Testfor \u0026 Testforblock
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Ivan Babydov, Ivan Babydov, Anete Lusina, Blue Bird
