EssentialsX

EssentialsX

2M Downloads

Mailing vanished player shows their display name (revealing them to be online)

mart-r opened this issue ยท 1 comments

commented

Information

Full output of /ess version: 26.10 04:11:47 [Server] INFO This server is running Essentials 2.15.0.52
EDIT: I had done /essversion instead earlier, but here is the right one:

26.10 04:25:16 [Server] INFO CONSOLE issued server command: /ess version
26.10 04:25:16 [Server] INFO Server version: 1.13.2-R0.1-SNAPSHOT git-Paper-396 (MC: 1.13.2)
26.10 04:25:16 [Server] INFO EssentialsX version: 2.15.0.52
26.10 04:25:16 [Server] INFO Vault version: 1.6.1
26.10 04:25:16 [Server] INFO EssentialsXSpawn version: 2.15.0.52
26.10 04:25:16 [Server] INFO EssentialsXChat version: 2.15.0.52

Server log (upload logs/latest.log to Gist): Not Applicable

EssentialsX config (upload plugins/Essentials/config.yml to Gist): Not Applicable

Details

If you have a player that's in vanish and you send them a message with /mail send their displayname will be shown revealing they're actually online (even though they're in vanish).
image

The line of code to blame:
user.sendMessage(tl("mailSentTo", u.getDisplayName(), u.getName())); (line 76)
Should probably check if user#isHidden() before sending display name.

commented

We could add a getDisplayNameFor(User) which checks isHidden then picks between the username and display name.

As a temporary solution, server owners can replace {0} with {1} in the mailSentTo message to avoid ever sending the displayname.