Detect player joining the same server from two clients

Discussion in 'Plugin Development' started by RcExtract, Jul 26, 2018.

Thread Status:
Not open for further replies.
  1. Offline

    RcExtract

    Is it possible to detect that the same premium player is joining my server from two clients?

    Lets say Premium minecraft player A joined a premium (onlin=true) server. The next minute, the same premium minecraft player tries to join the same server from another client. Will the connection automatically be blocked by client? or will the server knows that the player is trying to join it again from another client? (since we can obtain IP from players) Do i simply do offlineplayer1.isOnline() && offlineplayer1.getPlayer() == player2 && !offlineplayer1.getPlayer().getAddress().equals(player2.getAddress()) to check?
     
  2. Offline

    johnny boy

    if it's the same account, the server won't let it happen. If they are different accounts but on the same ip, it is allowed. (Unless you restrict it)
     
  3. Offline

    RcExtract

    I want to detect it. Will the server block it without firing event or notifying in any way?
     
  4. Offline

    ThePandaPlayer

    @RcExtract

    The server shouldn't fire an event. When a player logs on (and if the server is in online mode) the server checks against a Mojang authentication database to see if the account has access to online-mode servers. If the account is already logged on to the same server (or any server for that matter) the server won't allow the client to connect. Also, if the account is not premium, the server (or any servers) will completely block access from the client. It's a basic DRM measure. The client can still play offline however, they cannot play on any online-mode server. This completely changes for offline-mode servers. If the server is in "offline mode", it won't bother checking against the auth database, thus allowing anybody to join whether they are premium or not. This has the side effect of disabling skins, as a player skin is tied to their profile in the auth database.

    Why would you need to detect this? Is it for some kind of anti-cheat?
     
  5. Offline

    RcExtract

    Yes... Actually hypixel blocks stolen minecraft account and thats what i want to do
     
  6. Offline

    ThePandaPlayer

    @RcExtract
    Well then, I'm not the guy to talk to with that kind of thing. I may know how the auth system works, but I am in now way an expert. Sorry.
     
Thread Status:
Not open for further replies.

Share This Page