Vanish No Packet

Vanish No Packet

855k Downloads

Vanished players appearing in Multiplayer count

Larsone opened this issue · 6 comments

commented

One thing alot of the players on our server seem to have realized is that vanished players appear on the total number of players in the Multiplayer section before you log in... If for example 1 user and 1 vanished user are on it will say 2/85...

Is there any way to make it so that vanished users don't appear here without disabling the count entirely? it doesn't have to be toggle-able with /vanish they could perhaps just be removed from that count altogether.

Thanks in advance, L

commented

That's not currently possible under the bukkit api.

commented

Of course it is. You can fake the player count by simply modifying the MotD:
"[MotD]§[Online players]§[Max. players]"

Altough this is just a workaround, it works pretty well.

commented

This has the potential to interfere with motd changing plugins.

commented

And the potential to be bypassed rather easy too (which would, even worse, allow a certain detection of VNP!)

commented

You could potentially do the following:

PingEvent:

(ServerConfigurationManagerAbstract)((CraftServer) getServer()).getHandle()).players.remove( ((CraftPlayer) vanishedPlayer).getHandle());

and then add back the vanished players a tick later.

This may cause some weird issues though

commented

Requires protocollib, latest dev build.