mojira.dev
MC-125849

Update of stat.leaveGame

Hello.

I'm trying to show messages for players coming in or out of the server.

The first problem is that it is not possible to update my scoreboard for a new player who is logging on to the server for the first time.
(Possibility of solving it with stat.joinGame)
The second problem is that the stat.leaveGame gets updated only when the player reconnects.
(Ability to solve it by renaming it by stat.leaveGameCount)

Boolean and count should be used for entry and exit events.
Boolean:
If the player leaves the server; the variable stat.leaveGame = 1.
If the player reconnects the variable stat.leaveGame = 0.
If the player leaves the server; the variable stat.joinGame = 0.
If the player connects; the variable stat.joinGame = 1.
Count:
stat.leaveGameCount = Increment counter after exiting the server.
stat.joinGameCount = Increment counter after joining the server.

On the attached image:
The MorganlePro player logged in for the first time.
He was not allowed the welcome message.

For summary:
Currently we only have stat.leaveGame which is a disguised variable of stat.leaveGameCount for which there is a problem of discounting as it does not correspond to the event that is expected of it.

Attachments

Comments 2

Sorry i didn't know. Correction done !

First issue is working by design; you can target people without a (scoreboard) tag, and tag them afterwards instead.

The second issue, for me it changes instantly on disconnect; but of course a selector will not find them until they reconnect.

Perus Ludovic

(Unassigned)

Unconfirmed

multiplayer, server

Minecraft 1.12.2

Retrieved