The Meaning of Life, the Universe, and Everything.
Join Date:
8/25/2012
Posts:
56
Member Details
I am trying to detect the player's first join, I tried all of my ideas but they don't work.
I made a scoreboard objective called Join then I tried these commands:
/scoreboard players set @a[score_Join=!1] Join 1
/testfor @a[score_join=!1]
and a lot more but they don't work!
I also searched the internet but there was no working designs, Help would be greatly appreciated.
Well I do know how to detect players when they are on your L.A.N world/server/other its simple make a Clock pulsing in it then in a command block : /test for {players name} and have a Comparator facing out from it
The Meaning of Life, the Universe, and Everything.
Join Date:
8/25/2012
Posts:
56
Member Details
That was what I use for both command, I put them on a command block hooked up to a clock. they just come out as "Unknown command. Try /help for a list of commands". I still appreciate the help though.
Players scores aren't initialized when they first join the server, so you'll need to initialize them first. Rather than using a dummy variable you might be able to use teams to do this - I don't think they have to be initialized.
/scoreboard teams join @a[team=] New \\Add players without a team to the "New" team
/execute @a[team=New] ~ ~ ~ \\Run whatever commands you want to for players the first time they log in
/scoreboard teams join @a[team=New] Old \\Move players to the "Old" team after the commands have been run
Players scores aren't initialized when they first join the server, so you'll need to initialize them first. Rather than using a dummy variable you might be able to use teams to do this - I don't think they have to be initialized.
/scoreboard teams join @a[team=] New \\Add players without a team to the "New" team
/execute @a[team=New] ~ ~ ~ \\Run whatever commands you want to for players the first time they log in
/scoreboard teams join @a[team=New] Old \\Move players to the "Old" team after the commands have been run
I tried it but this was what it said:
"Could not add 1 player(s) to team 417d6e72-45a8-4cc8-a9dd-90e25463ff52: New"
EDIT:
Ok, I found what is wrong its /scoreboard teams join New @a[team=] not /scoreboard teams join @a[team=] New
Thanks!!
Players scores aren't initialized when they first join the server, so you'll need to initialize them first. Rather than using a dummy variable you might be able to use teams to do this - I don't think they have to be initialized.
/scoreboard teams join @a[team=] New \\Add players without a team to the "New" team
/execute @a[team=New] ~ ~ ~ \\Run whatever commands you want to for players the first time they log in
/scoreboard teams join @a[team=New] Old \\Move players to the "Old" team after the commands have been run
I made a scoreboard objective called Join then I tried these commands:
/scoreboard players set @a[score_Join=!1] Join 1
/testfor @a[score_join=!1]
and a lot more but they don't work!
I also searched the internet but there was no working designs, Help would be greatly appreciated.
EDIT: try this /testfor {playersname}
/scoreboard teams join @a[team=] New \\Add players without a team to the "New" team
/execute @a[team=New] ~ ~ ~ \\Run whatever commands you want to for players the first time they log in
/scoreboard teams join @a[team=New] Old \\Move players to the "Old" team after the commands have been run
I tried it but this was what it said:
"Could not add 1 player(s) to team 417d6e72-45a8-4cc8-a9dd-90e25463ff52: New"
EDIT:
Ok, I found what is wrong its /scoreboard teams join New @a[team=] not /scoreboard teams join @a[team=] New
Thanks!!
You have to create the teams first:
As well, the proper syntax for joining a team is:
Minecraft-things: http://skylinerw.com
More Minecraft-things: https://sourceblock.net
Guides for command-related features (eventually moving to Source Block): https://github.com/skylinerw/guides
I primarily hang out in the /r/MinecraftCommands discord, where there's a lot of people that help with commands: https://discord.gg/QAFXFtZ
Their corresponding subreddit: https://www.reddit.com/r/MinecraftCommands/