DiscordSRV

DiscordSRV

86.8k Downloads

VanishNoPacket silent joins not respected

KsaRedFx opened this issue ยท 16 comments

commented

When a player joins the server, DiscordSRV 1.19.0 and 1.19.1 both don't respect VanishNoPacket.
Both will announce the join to the discord chat, and will list the player under list

commented

Did earlier versions of DiscordSRV do this? Does DiscordSRV log "Hooked into VanishNoPacket" during startup?

commented

I am not sure about 1.18.4, as it's really only become noticeable to myself since the 1.19 update to how player joins are displayed.

I don't see "Hooked into" but I do see "Enabling"

[17:59:41 WARN]: [DiscordSRV] Loaded class com.dthielke.herochat.ChannelChatEvent from Herochat v6.0.1-SNAPSHOT-bb33 which is not a depend, softdepend or loadbefore of this plugin.
[17:59:41 INFO]: [DiscordSRV] Enabling Essentials hook
[17:59:41 INFO]: [DiscordSRV] Enabling VanishNoPacket hook

Edit: Digging through my chat history, it looks like it did work in 1.18.4

commented

So for join/leave messages, DiscordSRV never really has had any compatability for silent join/quit apart from it's own discordsrv.silentjoin & discordsrv.silentquit permissions, however I added a simple check that if the vanish plugin reports the player as vanished when the player joins/leaves the message won't go through (on Development builds: https://snapshot.discordsrv.com).

As to "list" do you mean the playerlist feature of DiscordSRV or are you running the list command using the command executor?

commented

I am using the list command in chat, using DiscordSRV.
I'm not running it via the console channel or via !c

commented

I tried the latest version, verifying that it was the version built after your debug commit, and I do not see the debug messages at all and it is still announcing the join

commented

Do you have DebugLevel set to something above 0?

commented

Ah, I dont. I'll try again with it on.

commented

We have our Discord server @ https://discordsrv.com/discord, you'll be able to see channels once you've verified in #read-this-to-join

commented
[19:15:37 INFO]: KsaRedFx logged in with entity id 56312 at ([creative_spawn]-278.91828403130023, 79.0, 154.5959507947674)
[19:15:38 INFO]: [DiscordSRV] [DEBUG] Tried stripping blank message
[19:15:38 INFO]: [DiscordSRV] [DEBUG] Tried stripping blank message
commented

Looks like VanishNoPacket might be returning false on isVanished when logging in, check that you're in vanish when you log in, and check if going in and out of vanish might effect whether or not you're show in the player list

commented

It might be, but I am certain I am vanished on login.
I verified by asking other people if they could see me and the output from the command:

[19:23:13 INFO]: KsaRedFx issued server command: /vanish
[19:23:13 INFO]: [VanishNoPacket] KsaRedFx reappeared.
[19:23:16 INFO]: KsaRedFx issued server command: /vanish
[19:23:16 INFO]: [VanishNoPacket] KsaRedFx disappeared.
Creative: Online players (1/20):
KsaRedFx

Toggling it back on while remaining connected, I find I am still in the list.
Other plugins also appear to be respecting to vanished flag, including a tablist plugin, so I'm not sure what would cause it to return false in this particular scenario.

commented

Are you using regular versions of VanishNoPacket, and is the version recent? I've made a slight adjustment to using Player objects instead of player names for the VNP hook, but I doubt that'd do it

commented

I am running the latest, regular version of VNP.

I'll try the next build the moment it completes

commented

That appears to have fixed it!

Thanks for getting to the issues I've opened over the last few days so quickly.

[19:33:05 INFO]: [DiscordSRV] This build of DiscordSRV is identical to develop. [latest public dev build]
[19:33:06 INFO]: Announcer: There are no longer any players online. Disabling broadcasts to prevent console flood.
[19:33:09 INFO]: UUID of player KsaRedFx is 83b77f01-6043-4faa-8c86-f553582de5ee
[19:33:10 INFO]: [VanishNoPacket] KsaRedFx disappeared.
[19:33:10 INFO]: [DiscordSRV] [DEBUG] Not handling possible unban for player KsaRedFx (83b77f01-6043-4faa-8c86-f553582de5ee) because doing so is disabled in the config
[19:33:10 INFO]: [DiscordSRV] [DEBUG] Not sending a join message for KsaRedFx because a vanish plugin reported them as vanished
[19:33:10 INFO]: KsaRedFx logged in with entity id 91 at ([creative_spawn]-278.91828403130023, 79.0, 154.5959507947674)
commented

Great, and no problem