BungeeCord Friend System

Discussion in 'BungeeCord Plugin Development' started by saraleo456, Jan 22, 2018.

  1. Hi everyone
    (Sorry if I make mistakes English is not my first Language)

    I try to make a friend system with bungeecord but I d'ont know how get OfflinePlayer uuid.

    I check some forums and discussions and I know I have to Query Mojang Server to get UUID from playerName.

    But I d'ont know how Query Mojang.

    Thanks for you awnser.

  2. If you're gonna query.. then you will need knowledge of decoding JSON. To make this easy, just use mcapi. https://mcapi.de/user <- Reference.
  3. Yours best option would be to use a database. Its less limiting and easier to work with in the long run than than the MojangAPI and means you only work from the pool of players that have joined your server. If a player has not joined your serve before you don't need to know their name from the Mojang servers, it's useless doing that and a waste of resources. Would recommend setting up a little MySQL database with a simple uuid, username fields and probably last login as well so you can use the latest user if there are duplicated usernames (unlikely but can happen). Or if there are duplicates in the database then you could use the Mojang API to update their names and go from there.

Share This Page