IdentifierAPI
Outdated:
- You may now retrieve the UUIDs via the Bukkit API
What it Does:
- Given a player's Minecraft username it returns their Mojang Account UUID
Why is this Useful:
- Minecraft usernames will changeable soon
- Make your plugin future proof
How to use this API:
- Please do not include this code in your own plugin but implement this API instead
- Users of your plugin should put this plugin in their plugins folder
- Checkout Bukkit Resource Thread
In your plugin's main class:
public static IdentifierAPI identifier; public void onEnable() { hookIdentifierAPI(); } private void hookIdentifierAPI() { PluginManager pm = getServer().getPluginManager(); if(pm.getPlugin("IdentifierAPI") instanceof IdentifierAPI) { identifier = (IdentifierAPI) pm.getPlugin("IdentifierAPI"); } }
To get a Player's Mojang UUID:
identifier.getPlayerUUID("EDawg878")
Source:
https://github.com/EDawg878/IdentifierAPI
Credit:
- @forairan https://github.com/forairan/ConvertUUID