The fact is that, I made a system that detects when a player leaves the game (scoreboard leave_game) and gives him 3 minutes to rejoin or be eliminated from the game.
So, I got to this point and said: How the hell am I going to remove the equipment to a player that is not in the game, and therefore the commands do not detect it? Somebody could help me?
I tried / team leave @a [scores = {leave_game = 1 ..}] but as I say, this command does not work since the player who has a point in leave_game is NOT in the game, therefore the engine does not detect it .
Nor can I reset the scores of that player on scoreboards precisely because of the above.
The fact is that, I made a system that detects when a player leaves the game (scoreboard leave_game) and gives him 3 minutes to rejoin or be eliminated from the game.
So, I got to this point and said: How the hell am I going to remove the equipment to a player that is not in the game, and therefore the commands do not detect it? Somebody could help me?
I tried / team leave @a [scores = {leave_game = 1 ..}] but as I say, this command does not work since the player who has a point in leave_game is NOT in the game, therefore the engine does not detect it .
Nor can I reset the scores of that player on scoreboards precisely because of the above.
Any suggestions?
Well, I believe you're close.
You can use
/execute as @a[team=<the team>,scores={leave_game=1..}] run clear @s
The 1st command won't work until the player returns, since as you said, the command does not detect players that are NOT in the game.
However, they won't be detected by other commands as well right? If you want to detect if a team is empty after that guy left, just empty the whole team and add back the ones in the game.
Hi, I'm doing a mini-game that involves teams.
The fact is that, I made a system that detects when a player leaves the game (scoreboard leave_game) and gives him 3 minutes to rejoin or be eliminated from the game.
So, I got to this point and said: How the hell am I going to remove the equipment to a player that is not in the game, and therefore the commands do not detect it? Somebody could help me?
I tried / team leave @a [scores = {leave_game = 1 ..}] but as I say, this command does not work since the player who has a point in leave_game is NOT in the game, therefore the engine does not detect it .
Nor can I reset the scores of that player on scoreboards precisely because of the above.
Any suggestions?
Well, I believe you're close.
You can use
/execute as @a[team=<the team>,scores={leave_game=1..}] run clear @s
<more commands to clean things up>
and then
/team leave @a[scores={leave_game=1..}]
/scoreboard players reset @a[scores={leave_game=1..}] leave_game
The 1st command won't work until the player returns, since as you said, the command does not detect players that are NOT in the game.
However, they won't be detected by other commands as well right? If you want to detect if a team is empty after that guy left, just empty the whole team and add back the ones in the game.