Player PREMIUM or not

Discussion in 'Spigot Plugin Development' started by KSDpolska, Nov 16, 2017.

  1. Hi!
    Someone can tell me a way that I can know if a player is premium or pirate?
    Thanks in advance!
  2. There are a lot of threads with the same question.
  3. If the server is in online mode, all players have to be premium.
    • Funny Funny x 1
  4. Is obviously the server is not in online mode
  5. Yes, indeed isn't online mode.
    Please, can you give me a post that give a correct way to do this?
  6. Choco


    You're not going to get any support in offline mode. If you're running offline mode, you're expected to support yourself.
    • Optimistic Optimistic x 1
  7. Thanks for your help.
  8. Offline mode means that the server doesn't connect to Mojang's servers at all.
    Therefore, no way to check if they did connect or not. The answer is always "no, they didn't authenticate with mojang".

    You could verify the username to see if it exists on Mojang's servers, that would tell you if a player uses an account that actually exists.

    But I dont see how that'd be useful, in offline mode, there is no checks to make sure a player is who they say they are.
  9. Actually there is a way, it's not so simple but there is.
    You can look at and try to understand how they do it.
    Quote from FastLogin FAQ:
    "How does this plugin work?
    By using ProtocolLib, this plugin works as a proxy between the client and server. This plugin will fake that the server runs in online mode. It does everything an online mode server would do. This will be for example, generating keys or checking for valid sessions. Because everything is the same compared to an offline mode login after an encrypted connection, we will intercept only login packets of premium players.

    1. Player is connecting to the server.
    2. Plugin checks if the username we received activated the fast login method (i.e. using command)
    3. Run a check if the username is currently used by a paid account. (We don't know yet if the client connecting is premium)
    4. Request an Mojang Session Server authentication
    5. On response check if all data is correct
    6. Encrypt the connection
    7. On success intercept all related login packets and fake a new login packet as a normal offline login"
    • Informative Informative x 1
  10. Make your server to be online-mode: true. This will force all players to be a premium player.
  11. you need 90 messages
    3 free plugins
    and 30 positive ratings
    • Funny Funny x 2