How to get player's name at the ping screen
#11
(08-23-2018, 07:16 PM)bearbin Wrote: Yes, it is not possible. The player is only added to the client handle once it has logged in, and I don't believe the username is even sent in ping packets. Can you link to an example of another server that implements this feature?

I believe that Mineplex and Hypickel had it some time ago... Maybe protocols changed or something. But it used to say "Welcome <player name>"
Reply
Thanks given by:
#12
OK, I have looked into it a little bit more. I'm pretty sure that there isn't a good way to do it, and the servers that have your name in the description just use a hack like PersonalMOTD which just correlates the IP Address of the user with their username after the first login, and then remembers the username mapping for next time.

Luckily you can do the same thing in Cuberite, as ClientHandle exposes a GetIPString method you can use to get the IP address.
Reply
Thanks given by:
#13
(08-23-2018, 07:40 PM)bearbin Wrote: OK, I have looked into it a little bit more. I'm pretty sure that there isn't a good way to do it, and the servers that have your name in the description just use a hack like PersonalMOTD which just correlates the IP Address of the user with their username after the first login, and then remembers the username mapping for next time.

Luckily you can do the same thing in Cuberite, as ClientHandle exposes a GetIPString method you can use to get the IP address.

oooh, that seems like a good idea, thank you for suggesting it!
Reply
Thanks given by:




Users browsing this thread: 1 Guest(s)