Closed jamierocks closed 9 years ago
Hide players (leave out player counts and sample completely, renders as ??? on the client) You can modify the List<GameProfile> https://github.com/CanaryModTeam/CanaryLib/blob/master/src/main/java/net/canarymod/hook/system/ServerListPingHook.java#L125
But will they render as ???
theres nothing server side that says that it would, i guess sending null profile would cause the ???
You can't really modify the profiles in there (without reflection) because you pass in Arrays.ArrayList
, which doesn't allow adding new entries: https://github.com/CanaryModTeam/CanaryMod/blob/1.7.10-1.1.3/src/main/java/net/minecraft/server/network/NetHandlerStatusServer.java#L46
The hidden player count works by leaving out the player section in the response completely, the client will check this and display ???
instead of the player count.
for Version Name, Server.getServerVersion would do (we don't do protocol hacks nor do I intend to allow any protocol hacks or changing the version/protocol displayed)
Never mind, could you add something in to get the 'Protocol version of client'?
Working on finding it and getting the information passed through
The protocol version of the client and the virtual host gets passed to the server in the Handshake packet. I'm not sure if the server saves it anywhere: http://wiki.vg/Protocol#Handshake
Also the ability to get the IP and port used to connect to the server, also in the Handshake packet.
Even if you do not want to allow modifying the version name and protocol version, would you allow plugins to hide the player count, you could do this fairly easy. eg the plugin could setPlayer to null, you could check for that and remove the players field in the handshake packet (if it is null).
Required API for ServerListPlus
???
on the client)They are already crossed off if Canary has that functionality.