Open arthurfiorette opened 3 years ago
Great idea!
Hey @games647 do you have plans for this?
Maybe you could use this event? https://github.com/games647/FastLogin/blob/main/bukkit/src/main/java/com/github/games647/fastlogin/bukkit/event/BukkitFastLoginPreLoginEvent.java
You should be able to get the premium status from the stored profile
Well there is this:
However the result is very depended on the plugin configuration. By default the plugin uses opt-in for requesting the online mode authentication. The reason for this is that, requesting an onlinemode connection from a cracked client, will result in a disconnect by the client (vanilla behavior). However, with the above mentioned event or changed plugin configuration, you could enforce that all players connecting with paid usernames to be premium.
If you need some overview about the login process, you can take a look at the FAQ. I did a simplified communication protocol.
To be clear, we can only check if a player is premium if both is true: we were requesting an online mode connection and the player passed through it. A cracked status could mean, the player is cracked or we didn't tested it in the first place. Maybe because we were unsure and afraid of losing the player, because of the mentioned disconnect behavior.
yeah, as time went by, i took a good look at the premium verification and encryption protocol... i could replace the login process with mine, as you also did on yours, but to a plugin that doesn't have anything with login and just wanna know the player status. replacing all the login steps will be dangerous... The only solution that i can think is the plugin separation that i said before, but anyways, i don't think fast login have to do that for himself.
i could also make the "api" that just replace the login and save the information for others plugins... but i'm unfocused on coding minecraft plugins anymore even if the only "barrier" that is in my mind is that if i do this i will create an incompatibility or bugs with all other plugins that have something in the login process. Do you have a solution or idea for that?
but to a plugin that doesn't have anything with login and just wanna know the player status. replacing all the login steps will be dangerous... The only solution that i can think is the plugin separation that i said before, but anyways, i don't think fast login have to do that for himself.
I wonder how you think this separation should work.
i could also make the "api" that just replace the login and save the information for others plugins...
If you are just doing everything the same like the original Spigot implementation, you could also just read the online mode of the server. Even in BungeeCord settings the onlinemode should (AFAIK) represent the premium status of all players, because otherwise they couldn't join.
What FastLogin effectively does is that it creates a mixed online mode where you have most players in offline mode, but others could join as premium players with their premium UUID, skin and optionally skip auth plugin authentication. The later option requires the request for online mode. Either by the player itself or based heuristics specified in the configuration. This means plugins can no longer rely on the online mode setting. This is where an API makes sense, but otherwise it's just reading the online mode.
Knowledge about a player who is logged in as a pirate or original can be very useful for many other plug-ins. There's many other threads asking for it too (and none works because when in offline mode, the uuid from original players are changed too):
I am an example of this. I just look for information on whether the player who logged in actually paid for his minecraft or not. I know there is a way to check if the nick is paid, but there are many failures to circumvent this.
Is your feature request related to a problem? Please describe.
No, this is more of a feature request than a bug fix feature request.
Describe the solution you'd like
I know you don't have much to do with it, but apparently you were the only one who coded such an efficient solution. In case you are interested in helping, I thought in some way.
Like a modification in the fast login itself making other plugins able to call and check if it is original or not:
Maybe a separation of the plugin (very unlikely, I saw that your code is well organized like that), like FastAPI that detects and makes the necessary connections with Mojang and etc. and FastLogin that only contacts the api and if it is 'true' (The API detected that this user is premium) he contacts the auth plugins and he does his job to bypass.
*EDIT: I saw that most mojang is done by CraftAPI, so maybe it’s not that difficult or it already exists and I i'm blind
Or even if you really don't want to, I would love your help to do something like this, I know enough about java for, but I found it confusing how the connection logic is made and organized with mojang, client and the server. If you could help me to code this it would also be a great help, as I am searching all over the internet to do this.
Anyway, any help from someone would be very useful.
Thanks for the time.