Skip to content
YellowPhoenix18 edited this page Sep 16, 2016 · 12 revisions

UUIDMethods - Usage

To use UUIDMethods you have to add the jar from Spigot to your Buildpath. After adding the jar you can add the Methods from this wiki to your source.

If you want to prevent Laags, you should load the Methods asynchronous!

Get Username

getUsername()

Loads Data if Mojang-Servers online from Mojang-Servers. If the servers offline, the data will be loaded from the Database. Returns if no Data could be found null.

Note: The Data from the Cache will be used! If you dont want to use the Cache, use the getUsernameWithoutCache()-Method.

//uuid as String
String uuid = "988b7701-b82d-453f-8d5f-21519788ad70";
//returns Username as String
String username = UUIDAPI.getUsername(uuid);

getUsernameWithoutCache()

Loads Data if Mojang-Servers online from Mojang-Servers. If the servers offline, the data will be loaded from the Database. Returns if no Data could be found null.

Note: This Method dont save your Data to Cache, this may increase data usage!

//uuid as String
String uuid = "988b7701-b82d-453f-8d5f-21519788ad70";
//returns Username as String
String username = UUIDAPI.getUsernameWithoutCache(uuid);

getUsernameMojang()

Loads Data directly from the Mojang-Servers. Returns null if they`re offline.

//uuid as String
String uuid = "988b7701-b82d-453f-8d5f-21519788ad70";
//returns Username as String
String username = UUIDAPI.getUsernameMojang(uuid);

getUsernameDatabase()

Loads Data directly from the Database. Returns null if data can`t be resolved.

//uuid as String
String uuid = "988b7701-b82d-453f-8d5f-21519788ad70";
//returns Username as String
String username = UUIDAPI.getUsernameDatabase(uuid);

getUsernameLocal()

Loads Data directly from the local storage.yml. Returns null if data can`t be resolved.

//uuid as String
String uuid = "988b7701-b82d-453f-8d5f-21519788ad70";
//returns Username as String
String username = UUIDAPI.getUsernameLocal(uuid);

Get UUID

getUUID()

Loads Data if Mojang-Servers online from Mojang-Servers. If the servers offline, the data will be loaded from the Database. Returns if no Data could be found null.

Note: The Data from the Cache will be used! If you dont want to use the Cache, use the getUUIDWithoutCache()-Method.

String username = "YellowPhoenix18";
String uuid = UUIDAPI.getUUID(username);

getUUIDWithoutCache()

Loads Data if Mojang-Servers online from Mojang-Servers. If the servers offline, the data will be loaded from the Database. Returns if no Data could be found null.

Note: This Method dont save your Data to Cache, this may increase data usage!

String username = "YellowPhoenix18";
String uuid = UUIDAPI.getUUIDWithoutCache(username);

getUUIDMojang()

Loads Data directly from the Mojang-Servers. Returns null if they`re offline.

String username = "YellowPhoenix18";
String uuid = UUIDAPI.getUUIDMojang(username);

getUUIDDatabase()

Loads Data directly from the Database. Returns null if data can`t be resolved.

String username = "YellowPhoenix18";
String uuid = UUIDAPI.getUUIDDatabase(username);

getUUIDLocal()

Loads Data directly from the local storage.yml. Returns null if data can`t be resolved.

String username = "YellowPhoenix18";
String uuid = UUIDAPI.getUUIDLocal(username);