IdentifierAPI - Retrieve Users Mojang UUID

Discussion in 'Resources' started by EDawg878, Oct 26, 2013.

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

    EDawg878

    Why This is Useful:
    * Mojang will begin allowing users to change their username
    * You can future-proof your plugin by converting to using their Mojang Account UUID

    Download: http://dev.bukkit.org/bukkit-plugins/identifierapi/
    Alternative Dowload (Until Bukkit Verifies the Project):
    <removed non-bukkit download>

    Hook the IdentifierAPI in your plugin's main class:
    Code:java
    1. public static IdentifierAPI identifier;
    2.  
    3. public void onEnable() {
    4. hookIdentifierAPI();
    5. }
    6.  
    7. private void hookIdentifierAPI() {
    8. PluginManager pm = getServer().getPluginManager();
    9. if(pm.getPlugin("IdentifierAPI") instanceof IdentifierAPI) {
    10. identifier = (IdentifierAPI) pm.getPlugin("IdentifierAPI");
    11. }
    12. }


    Hook the plugin in your plugin's main class:
    Retreive a player's UUID:
    Code:java
    1. identifier.getPlayerUUID("EDawg878")


    Credit to Forairan for https://github.com/forairan/ConvertUUID
     
  2. Offline

    Ultimate_n00b

    For anyone looking for Mojang's lib, it is located here.
     
  3. Offline

    Goblom

    EDawg878 I do hope you know that all forairan did was make the source that mojang created compile from maven.

    So, credits should go to mojang ;)
     
    hintss likes this.
Thread Status:
Not open for further replies.

Share This Page