Verify if the player has paid/is premium

Discussion in 'Plugin Development' started by BloodShura, Feb 29, 2012.

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

    BloodShura

    Is there a way to verify if a player has buyed/paid Minecraft?
     
  2. Offline

    luckie12

    hmm, cracked servers use normal the verify-name or name-verify = false Line inconfig
    Standard server checks automatically for it
    if u add verify-name = false or name-verify = false then it disables to check if user buyed/paid Minecraft :)
     
  3. Offline

    BloodShura

    But, I need to use this in a plugin, and per-player e.e
     
  4. To check if players have premium account, I belive there's a link from minecraft.net that checks the nickname, but I don't remember it, search for it :}

    Also, there isn't such thing as "cracked servers", there are offline servers that don't check player names against minecraft.net, that doesn't mean they're cracked... however, the clients that bypass minecraft.net login are cracked clients.
    You can easily check if servers are offline mode using a bukkit method, it's self explainatory if you see the getServer() methods.

    EDIT:
    Still, it's kinda counter-productive to manually check if players are premium when you can just enable online mode back... one of the reasons for offline mode is the possibility that minecraft.net's verification fails with a timeout.
    You could just make your plugin not to work on offline mode servers, but manually checking each player (AGAIN if the server is online mode) is a waste of bandwidth, time and possibly lags the server.

    EDIT #2: oh, I see, you just want to check specific players, rarely.

    I found a different link tough: http://www.minecraft.net/haspaid.jsp?user=(name here)
     
    BloodShura likes this.
  5. Offline

    BloodShura

    Yes, I remember a long ago, in CommandBin there was a command, I think /paid, which verify if the player has paid or not. I need something just like this.
     
  6. Offline

    DrAgonmoray

  7. Offline

    BloodShura

    Thanks! :)

    Er, DrAgonmoray, why is this always returning NO? I even tried Notch and it return NO. '-'

    @Edit:
    Oh, thank you, Digi! it works.

    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: May 24, 2016
  8. Offline

    DrAgonmoray

    Sorry. :|
     
  9. Offline

    BloodShura

    No problem DrAgonmoray, you answer me and it's what matter. :)
     
    DrAgonmoray likes this.
  10. Offline

    stelar7

    Here, take this<Edit by Moderator: Redacted mediafire url>
    it contains functions to check if a player has bought a copy of minecraft :)

    usage example:

    Show Spoiler
     

    Attached Files:

    Last edited by a moderator: Nov 11, 2016
    BloodShura likes this.
  11. Offline

    mbaxter ʇıʞʞnq ɐ sɐɥ ı

    Set your server to online-mode=true and if they log in, they've paid!
     
    Ahmet094 likes this.
  12. Offline

    BloodShura

    mbaxter, it's for a plugin, not for a server. I'll make this for other people. Please, don't troll. I'm just making something to help other people.
     
  13. Offline

    theguynextdoor

    Tbh, what he said wasn't trolling, he was merely stating the facts.
     
  14. Offline

    BloodShura

    So, we can't simplyy make a function in a API of a plugin, to verify if the player is premium, and others come here say to buy the game and use online mode. I have the game, and I use online mode, but i'm doing this for the plugin, not for me.
     
  15. Offline

    stelar7

    look at my last post, there is the API you want...
     
  16. Offline

    BloodShura

    Yes, I see it, but I need to do this on my plugin, and at time I'm using:

    Boolean premium = false;

    try {
    URL url = new URL("http://www.minecraft.net/haspaid.jsp?user=" + player);
    String pr = new BufferedReader(new InputStreamReader(url.openStream())).readLine().toUpperCase();
    premium = Boolean.valueOf(pr);
    } catch (Exception e) {
    e.printStackTrace();
    }

    return premium;
     
  17. Offline

    stelar7

    :facepalm: an API is something you import so skip writing code yourself...
     
  18. Offline

    BloodShura

    But I'm making an API for OTHER users.
     
  19. Then give them that API if there's already one made.
     
  20. Offline

    stelar7

    [quote uid=90611706 name="BloodShura" post=993675]But I'm making an API for OTHER users.[/quote]
    I just did that...

    Look here:
    [quote uid=70676 name="stelar7" post=991992]Here, take this<Edit by Moderator: Redacted mediafire url>
    it contains functions to check if a player has bought a copy of minecraft :)

    usage example:

    Show Spoiler


    [/quote]
     
    Last edited by a moderator: Nov 11, 2016
  21. Offline

    BloodShura

    I know, but I'm making a API with soo many things, not just this. At the moment, there are 70 things in the API.
     
  22. Offline

    Muddr

    But you don't know how to add 20 lines from one API to another..
     
  23. Offline

    nisovin

    I'd like to point out that URL will only tell you if that user account is premium. It won't tell you if the player logging in is actually authenticated to that account.
     
    Ahmet094 likes this.
Thread Status:
Not open for further replies.

Share This Page