I am making a map and I need to testfor the last player alive in the arena. I tried with selectors, but I am not really into this. Can someone help me out?
5989
I want to run a command when there are only 10 entities left. I know you can use /execute unless entity to detect when all matching mobs have died, but it doesn't work if you want to run a command when there are for example 10 entities left.  A command like /execute if entity @e[limit=10] does not work, it also triggers if there is only one entity.  Such a counting system could also be used to determine once there is only one player left in an arena, meaning they have won a battle or similar.
3681
I am trying to make a command block that when powered, it will looks for a specific player in a 5 block radius of the command block. I tried   /testfor @p[r=5][name=&lt;name of player&gt;]   but it doesn't work.
42159
I am trying to make it to where points for teams are shown in the scoreboard but I can only manage to get player names on there, what command do I use? On 1.16
43340
I'm working on a map in Bedrock Edition, and I need to have a command block at the end that says "Congratulations [player], you win!" Because it's a map, I cant just have it say a specific player's name, and I've seen maps that do exactly what I want mine to do. How do I format the command to allow this?
41787
Basically, I'm trying to recreate the Faction plugins /f map in my single-player without mods as my PC doesn't run them very well. (I know it sounds strange.) I am trying to use the /testfor to test if I have written '/f map' in chat, and if I have, it would show me a custom generated map. I don't know how to word this better xD Essentially what I want is for it to test if I have written a command in chat, and if I have, display something.
89399
I am making a multiplayer parkour map on bedrock edition, and I have it set up where when a player steps on a grass block they die. But when a player steps on a grass block it just kills anyone who touches it.  First: A repeat command block (set to always active and unconditional)   execute @e [type=player] ~ ~ ~ testforblock ~ ~-1 ~ grass   And then I have a chain command block (set to conditional and always active)  kill @e [type=player]   And it does work..... IF in singleplayer only. (which is not at all what I want)  Thank y'all in advance.
119913
I understand commands but I am fairly new to the 1.13 changes.  I am trying to make an AFK system within vanilla Minecraft.  I want to use the /execute command to execute once. I want to detect when a scoreboard objective is a certain value and print  [Player] has gone AFK   in the chat only once. This is my command at the moment,  execute as @a[scores={afk=1..}] at @s run tellraw @a {"text":"","color":"red","extra":[{"selector":"@s"},{"text":" has gone AFK.","color":"yellow"}]}   It keeps printing until the scoreboard value is reset.
92259
I'm trying to activate some command blocks only if there's more than one player online in my vanilla server. Is there a way to accomplish this with command blocks?
80544
I would like to detect when a player attacks/hits/hurts another player or entity. I have tried to use the AttackTime tag, but it doesn't work. Here is what I have tried (on a 20HZ clock):  First command block:   scoreboard players set @a Attack 0 {AttackTime:0s}   Second command block:  scoreboard players set @a Attack 1 {AttackTime:1s}   Third command block:  tellraw @a[score_Attack_min=1] "Nice shot!"
18294
None of the physics sensors in my game work, I'm trying to create an AI man that chases after a player, but for whatever reason, he just won't sense the player, I've tried copying and pasting the property name just to be sure, but that's not it.
49707
Is there a known good way to have a "computer" opponent play a Match 3 game? It doesn't have to be fancy, or even considered fair. If the AI always takes the best move on the board that would be OK with me. Note that a valid move is one that doesn't make a match.  Edit: What I am currently doing is a brute force approach. I look at every tile on the board, and see what the best move that tile can do. I add it to a collection and give it a score (based on how many it will match 3 or 4). Once I have traversed the entire board I use the move with the  best score. In the event of a tie I pick one.  If a 5 match combo is found I short circuit out to that one. 5 is the highest combo you can get)  I may not be able to improve it, but it feels like this should have been solved already.
104547
I'm making an End Portal in creative mode and it won't work. I have a Minecraft combat handbook and I made a portal just like it says to do it.  Do you have to be at a stronghold? I tried lava first and eyes after, but I can't get it to work.  When I point the eyes in the right direction it does not work. The portal cannot be activated, and I don't know what I'm doing wrong.
80221
I am trying to testfor a player holding a diamond sword named Notch's Legendary Sword. How can I do that? Who ever gets the best answer will be able to get the first look at my NEW adventure map!
20710
I am working on a game that uses commands in such a way that players disconnecting then reconnecting could break the commands. I was wondering if there is a way to detect when players join the game in 1.13.2 and run a command to give them an item. When I researched this, I found solutions for older versions using /testfor or stat.leaveGame, but those seem to be outdated in 1.13. If someone could show me the commands to use as well as the layout for command blocks/redstone that would be great. It can be for the second time they join only, or for all times that they do. Thanks
110225
I have a hexagon tiled map in which I need to check when a hexagon is clicked. The hexagons aren't actually touching, rather they have a slight gap in between each of them.  Does anyone know how could I go about checking whether a hexagon is clicked without over complicating the whole thing?
62404
What I have now is:  /testfor @a {SelectedItemSlot:0,Inventory:[{Slot:0b,id:"diamond_pickaxe"}]}   How can I use the /testfor command to test a specific slot for a specific item that is enchanted?
8924
I'm looking for ready to use thirdparty leaderboard service where player's achivementes and scores can be placed. I'd intagrate it into my game to allow players push scores and locate themselves in the tables of tops. It would be nice whether anybody experienced share some points with me.