DrexHD / Vanish

Fabric vanish mod to completely hide from other players using /vanish
MIT License
18 stars 9 forks source link

Fake Leave Should Trigger Scoreboard Criteria #44

Open AphoticGoblin opened 3 months ago

AphoticGoblin commented 3 months ago

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.

DrexHD commented 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

AphoticGoblin commented 2 months ago

Correct

DrexHD commented 2 months ago

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:.

AphoticGoblin commented 2 months ago

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.

DrexHD commented 2 months ago

I still don't understand. If I have two command blocks like this running every tick, which are always loaded.

  1. execute as @a[scores={leave=1..}] run say test
  2. 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.