This will not be updated.
Important! Read this!
To use this you must put your server in offline mode.
Put this plugin in and it will auth your players.
Use the configuration to whitelist IP's. Such as your bungeecord servers.
You also need ProtocolLib as it uses that to directly edit a necessary packet.
You should also be running spigot else your server will have lag spikes while running this plugin.
When changing craftbukkit/spigot versions.
Make sure that this plugin is still compatible!
Failure to setup this plugin properly will leave your server unprotected.
Oh and lastly. Seeing as this is dealing with auth'ing players.
You are using this at your own risk.
I am not responsible for any screwups.
Be sure to check you have done everything correctly.
You have been warned.
So. What does this do?
Glad you asked!
When logging in normally a player will still be auth'd and accepted if he has a valid minecraft session.
When logging in from a bungeecord server, it will compare the IP he is using and if you whitelisted the IP. It will let him in without authing him.
This allows you to use bungeecord and the normal method.
How does this work?
When logging in, your client tells the server "I'm logging in"
The server realizes it is in offline mode and sends the string "-".
I catch the message being sent to the client from the server and turn the "-" into something like "3q467234q572457245".
I need to do this else the client will think its a offline mode server and will not bother to say its a real account.
The client then either goes "Shit. Bad login" or carrys on.
If it carries on..
Running bukkit: Fires PlayerLoginEvent which then fires a fake AsyncPlayerPreLoginEvent. This is run on the main thread which will lag everyone until this finishes checking his account.
Running spigot: Runs AsyncPlayerPreLoginEvent which is in another thread and will not lag everyone.
Then I check AsyncPlayerPreLoginEvent if the IP is whitelisted.
If it is. I don't bother checking anymore and just accept the player.
"Welcome dear friend"
Else the plugin finds the pending connection.
It loads relevant data from the pending connection then uses that to contact mojang.
"Sir.. Is this a real account?"
Notch then waddles over to his book
"Looks like it is son"
"Thank you sir"
*bows deeply and leaves*
Then I let them into the server.
Else I go tell the client "Yer a scam! A fake! Shove off!"