Cuberite Forum

Full Version: Can I refuse clients of old versions to log in the server?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I don't want clients of old versions to log in the server. In other word, I only want clients of specific version to log in it.

Can I modify config file to do it? Or I have to rewrite code or write a plugin?

PS: My English is not so good, so please forgive me for the bad grammar. Thank you.Smile
I already made a plugin for that, but I didn't create a thread for it so that's why you couldn't find one. Here it is: https://forum.cuberite.org/attachment.php?aid=434
(06-20-2014, 02:06 AM)STR_Warrior Wrote: [ -> ]I already made a plugin for that, but I didn't create a thread for it so that's why you couldn't find one. Here it is: https://forum.cuberite.org/attachment.php?aid=434

I used to believe that I can get procotol version from HOOK_HANDSHAKE, so I could not make a plugin to do it. Thank you for tell me how to do it.
We have a hook called OnLogin that gives the information about the protocol. I do have to mention that you can return true with the OnLogin hook to block the player from logging in, but I didn't do that in my plugin because I wanted a customizable kick message.