IdentifierAPI - Retrieve Users Mojang UUID

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

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


    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

    Alternative Dowload (Until Bukkit Verifies the Project):
    <removed non-bukkit download>

    Hook the IdentifierAPI in your plugin's main class:
    1. public static IdentifierAPI identifier;
    3. public void onEnable() {
    4. hookIdentifierAPI();
    5. }
    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:
    1. identifier.getPlayerUUID("EDawg878")

    Credit to Forairan for
  2. Offline


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


    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