I'm making a 1.12 map that need to do something when a player join. I tried stats.leavegame method, but if the game crashed the last time, the command won't run.  No file permission for it's hard to share, but unintended file type (like using a file to take the place of a folder, in my answer) is fine
24668
Is there any way to run a command automatically when a player joins the server? I need to do this without the use of a Bukkit plugin. I think it's possible with MCP but I want to know how!
28866
I need a way for a command block to say things in chat when it is powered, or more preferably whenever someone spawns into the world.
39738
This is similar in a way to , but the solution the MBraedley gave didn't work for me. As the linked post says, I've also tried the many ! values in front of the coordinates etc., to no avail.  Essentially, I'm creating a "safe zone" area for the spawn (regardless of spawn protection settings) of my realm, similarly to that of survival servers like what LemonCloud had. I've got detecting in the area down, but now I need it for those outside the area.
45192
I'm trying to make a minecraft map and to prevent cheating i want to run a command on a clock that sets everyone in creative mode except myself back to adventure mode.
88558
I want to check which of my games need the least achievements to achieve a perfect status.   The only way to see the game stats that I know of is to go to the games list from a player profile but that's too tedious, especially with over 250 games with varying degrees of play-times and achievement completion.
16671
This has got me. I need a command that tells me if all players on a server are in a radius of a command block. If one of them isn't in the radius, the command will be false. Any ideas? Thanks!
32591
So I wanted to set up something that uses stat.mineBlock.snow, but it wouldn't work. I tried other stat.mineBlock, but they wouldn't work either. I did the command /scoreboard objectives add snow stat.mineBlock.snow Snow But it returns with Usage: Invalid objective criteria type 'stat.mineBlock.snow' So what am I doing wrong, and how do I fix this?
13168
Note that this is only focusing on Minecraft Java Edition, and for versions 1.13+. I am predominantly looking for a solution that does not require any external programs (like MCEdit or NBTExplorer) and will work in just plain vanilla Minecraft, although if the only solution doesn't fit these criteria, I'll still take it (since having a solution is better than no solution!) Essentially, I am looking for a way to put a phrase (meaning essentially there are two or more words and spaces are involved) on a Minecraft scoreboard. This is what I mean by 'phrase': One two three, 1 2 3 These are not 'phrases': OneTwoThree, One-Two-Three, One_Two_Three, 1-2-3, etc. However, it seems like the only way to add text to an objective on the scoreboard is to add a &quot;fake player&quot;, via /scoreboard  players add [playername] [objectivename] [score], which shows the [playername] and the [score] part of the command on the scoreboard. However, since player names can't have spaces at all, it means that you can't have a phrase shown on the scoreboard. I have seen on many servers scoreboards that do have phrases listed on the scoreboard, but I have no idea how they do this (probably because of plugins that can do this sort of thing).  I did notice that teams can be given display names that can have spaces, so is there a way to display the team name on the scoreboard (thus being able to put phrases on there?)? Overall, my main question would be &quot;Is there a way to use spaces on the scoreboard (excluding the objective name) in vanilla Minecraft?
65744
I have started a server in 1.5 and was wondering how to op myself. The /op &lt;player&gt; command does not work and in 1.4.7. I used to open up the ops.txt file but I cannot find it in 1.5. Can anyone help as this would be useful to teleport my friend to me.
31713
I was wondering if it is possible for you to make a command block spawn hostile mobs in random places in a specified area?   I need the mobs spawned on different Y coordinates too because you need to fight your way up a tower to the top and I want the mobs to vary on each level to have specialty to each floor every time you play the mini game.
17352
I am making an RPG map, and was wondering how to "save" the game.  If you die, you would revert back to a save that happens automatically or manually, and I was wondering how to have it so that you will have all the items you had then, and none of the items you got after you saved (so /gamerule keepInventory won't work).  The only way I can think of doing this is having this long, long, annoying set of command blocks to test for all the items in the game, and then have another 64 command blocks for each of those items, testing for the amount of the item.
7336
So I am currently making a minecraft custom map (for 1.9). I want to make the player "say" something using /tellraw commands. I did figure out how to make the player name come up using /say commands, but still have no idea how to do it using the /tellraw command.  How do I do that?
85934
I've been making a map for 1.10 and it's going great, but 1.11 shows great mobs to use for it. However, most things have channged in command syntax. For example, /kill @e[type=ArmorStand,r=6] is now /kill @e[type=Armor_Stand,r=6]  What about /testfor? I can't find a way to testfor a player to stand on a block and give them an effect.   What's is going on in this image is that a redstone clock is running into this command /testfor @a[1117,20,507,r=1] (if I was to stand on them cords the comparator would turn on and power that command block), but it only works in 1.10... from 1.11 snapshots, I've seen some errors of it, like it now needs to have {} at the beginning and end of it. (e.g. /testfor @a{[1117,20,507,r=1]})   It's still not working, though, so does anyone know how to get it to work?
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.
29071
I am trying to join my friend's Garry's Mod server and Steam is telling me that Garry's Mod is trying to launch with optional parameters. I don't know why, and he is telling me that he does not know.   The code it is trying to run is:    +connect p2p:(a long string of numbers is here).   What does this mean exactly? Should I be concerned? As of now, I have not connected yet.   Update: I tried to join a friend's Borderlands 2 game and it gave me a similar thing.  It tried to run:  +connect_lobby (a long string of numbers)   Is Steam just displaying something it normally doesn't?  Update: It has stopped loading them up with optional parameters, or at least showing me that it has been.
11363
I am trying to make a snowball that triggers a command when it hits a player in 1.15, but I don't know how to do that. When I do execute at @e[type=snowball] run gamemode spectator @a[distance=..2] it only runs the command if it goes right next to them.
96893
My 1.12 solution can be found . When trying to update command blocks to 1.13, I have the following:  scoreboard objectives add invert dummy   (run at start) then:  scoreboard players set FakePlayer invert 1   (impulse unconditional repeat) chained into:  execute at @e[tag=summoned] run scoreboard players reset FakePlayer invert   (chain unconditional repeat) chained into:  execute if score FakePlayer invert = 1 invert run say "All summoned animals are dead!"   This should reset FakePlayers score continuously until all entities with tag "summoned" are dead, then it should run the final condition. This does not happen, and I can't see why.