Solved Cracked and Premium test?

Discussion in 'Plugin Development' started by Blender4Me, Aug 21, 2014.

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

    Blender4Me

    My english is not so good, i know :p
    Hi,
    I want to create a Plugin with it you can only join with a cracked account if the name is not reserved by a premium account.

    I know how to test if the name is alredy used by a premium, but I dont know how to check if the player connectet with a premium or a cracked account.


    Code:
    Player-Login
    -> Test if the player is premium:
      ->If false: Test if name is already bought by a Premium-Player
        -> If true: Kick the Player "This name is already used by a premium-player"
        -> If false: Nothing ^^
    
    (Ignore the println() - it's just for debuging) ^^
    Code:
        @EventHandler
        public void onJoin(PlayerJoinEvent e) {
            Player p = e.getPlayer();
            String n = p.getName();
            boolean prem;
            try {
            URL url = new URL("https://minecraft.net/haspaid.jsp?user=" + n );
            String isPremium = new BufferedReader(new InputStreamReader(url.openStream())).readLine().toUpperCase();
            prem = Boolean.valueOf(isPremium);
            System.out.println("1");
            System.out.println(n);
            System.out.println(prem);
                if(prem){
                e.setJoinMessage(n + " hat Premium");
                System.out.println("2");
                }
                } catch (Exception e2) {
                p.sendMessage("Invalid player!");
                System.out.println("3");
            }
    How it may work:

    Code:
    1) Client connects with the Server
    2) Client wait for the Serverid...
    3) Server checks with help of haspaid.jsp, if the player is premium or cracked.
    4) If yes, he will give back the true Serverid
    5) If no, "-" will send back
     
    And the "minecraft.net" check will be removed for the Cracked player
    Maybe a useful link:
    Code:
    http://session.minecraft.net/game/joinserver.jsp?user=<USERNAME>&sessionId=<SESSION ID>&serverId=<SERVER ID>
     
  2. Blender4Me
    AFAIK you cant check that but of course a Player with a premium account cant have the Name of another Player with a premium account so you dont Need to check that
     
  3. Offline

    Blender4Me

    DoppelRR I am 99% sure that it's possible. As far as I know there is a Server with a plugin like the Plugin I want

    And I dont want a cracked player joining with a premium name... That is all ^^
     
  4. Offline

    ferrago

    Blender4Me I feel like this in some way would violate EULA, gotta remember Mojang owns Bukkit, so I would tread lightly.
     
  5. Offline

    Blender4Me

    @ferrango And where is the problem? There are so many cracked Servers and I dont know how this would violate EULA :/

    So can somebody help me or not :C
    Posting that cracked is not good is not helping me :p
     
  6. Offline

    BillyGalbreath

    Offline mode is not supported.
     
    _LB likes this.
  7. Offline

    Blender4Me

    Maybe its not supported, but it works... But it seems like nobody wants to help me :/
     
  8. Offline

    xTigerRebornx

    Blender4Me You won't get help here as it isn't supported here.
     
  9. Offline

    TheHandfish

    You're surprised?
     
  10. Blender4Me
    When ist not supportet by bukkit you Need to go into NMS

    Blender4Me
    and of course just go on the Server youve seen it and ask there

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jun 9, 2016
  11. Offline

    Blender4Me

    Ok... Its solved :3
    Solution: Nobody knows how it works ^^
     
  12. Offline

    Epicballzy

    The best way you can get people from playing as different players, is getting a password plugin.
     
  13. Offline

    Jade

    Locked. We do not support offline mode.
     
    BillyGalbreath and _LB like this.
Thread Status:
Not open for further replies.

Share This Page