Open AphoticGoblin opened 3 months ago
Which scoreboard criteria is used for detecting leaving?
Edit: Looking through the code, I assume you are referring to minecraft.custom:minecraft.leave_game
Correct
Can you explain your setup. Because as far as I was aware, it is mainly useful to detect joins. Because the player is no longer present when the stat is increased and therefor can no longer be selected through entity selectors -> no detection :thinking:.
I have a datapack that plays a sound when the scoreboard increases for any player and also a datapack that removes a tag from a player when the scoreboard increases for them.
I still don't understand. If I have two command blocks like this running every tick, which are always loaded.
execute as @a[scores={leave=1..}] run say test
scoreboard players remove @a[scores={leave=1..}] leave 1
and a scoreboard /scoreboard objectives add leave minecraft.custom:minecraft.leave_game
, test will only be sent to the chat when I join, not when I leave.
Fake leaves do not trigger scoreboard criteria, making it so that any datapacks which detect leaves through this method will clearly reveal that the leave is a fake.