Changing Server verification Database and possibly method

Discussion in 'Spigot Plugin Development' started by Banbeucmas, Apr 28, 2017.

  1. I am planning to do a project this summer which is Minecraft related tbh. But my lacking of knowledge of the Server API and web related stuff is a proplem so I need to confirm something.
    Is it possible to change the server auth database of Mojang to a custom database in a server using plugin? Few things to note
    - Server is offline mode (Definitely :p, else it would connect to Mojang database)
    - By database, I mean its still contains information like Player skin (Without the use of connecting to the Mojang database and Mimicking a pre account skin like SkinsRestorer plugin), and some custom information that the original Mojang database wouldn't have
    - Have a way to change the auto generated UUID of offline mode if possible
    , then if not, I can find another way to get around with
    - The password verify would do after passing the PlayerPreLoginEvent and LoginEvent

    If this is possible please tell me what to do since I am lacking of way to approach it.
    I am willing to take my time to complete this project, thanks
     
    #1 Banbeucmas, Apr 28, 2017
    Last edited: Apr 28, 2017
  2. sothatsit

    Patron

    This would require extensive research into the server and the client's code to verify what is and what is not possible. Just know that everything server-side can be changed. Everything. However, the client cannot unless you force your players to download your own modified client, which is far from ideal. I believe a lot of the information that is sent to the client is signed by mojang, and as such cannot be mimicked (I know this is the case for skins, for example). This is why plugins are not able to take an arbitrary png file and give it as a skin for the player, mojang must sign it for the client to accept it. I am not sure how far reaching this sort of encryption is, although it would be interesting to look into I'm sure. Good luck.
     
  3. Thanks for the reply. Its good to know this would be possible.
    I might take all of my summer just to do this tbh :p
     
  4. It's going to take you a lot more than a single summer to even begin to realize how to research what you're asking
     
  5. WAS

    WAS

    You'd probably get a better foothold into doing this with a build prior to Mojang Auth (meaning you'll be missing about everything modern) and implementing a system similar to the modern methods. Which to say the least, is going to be a headache by yourself.
     
  6. The reason a .png or other image file can't be sent as a skin, is because its URL hosted by Mojang is in a payload containing a signature that will be invalid while modified. There are APIs that use alts to change skins to .png files and return the signature, which is a bit of a workaround. But for the most part, besides textures, you should be able to modify/replace most things.
     
  7. Thanks for the tip, I am starting to looking into it now :)
     
  8. sothatsit

    Patron

    I don't see what this adds to the conversation. You've restated my points that skins can't be sent as a png you have locally (albeit with more detail), and stated you don't know what else you can change. You've responded for the sake of responding and I don't understand why.
    wiki.vg is a good place to start.
     
  9. Yes, its possible, i make it on my BungeeNPC plugin :)
    And earlier in my MerrySkin plugin!
     
  10. I assume the current method rn is getting a premium skin link and bind it into the player
    While I want to get the skin from a database and bind it to the player
     
  11. sothatsit

    Patron

    The client will not accept skins not hosted on mojang servers, which means a premium player must have had that skin on at some point.
     
  12. Hmmm, good to know.
     
  13. Then, what about other data like UUID or such.
    As far as I know, the server Auto generate the UUID when its in offline mode, which might be someway to get around with
     
  14. Nope, there's set UUIDs for players in offline mode, which can be shown with something like this tool: http://tools.glowingmines.eu/ (Or with code, obviously)
     
  15. sothatsit

    Patron

    The server generates the UUID from the player's name in offline mode. So the UUID is as unique as the player's name (not very unique).
     
  16. Does it the same for all offline servers?
    I don't get it when you said not very unique
     
  17. sothatsit

    Patron

    In offline mode players generally used hacked clients that allow them to choose their player name. Hence, their player name is not unique and the UUID that is directly generated from their player name is also not unique.
     
  18. Thats enough information that I would need.
    Thanks for the help