A Java implementation of the mc-api.net API.
Setting request server
MC-API has multiple mirrors, you can choose your mirror like so:
UUIDAPI.setRegion(ServerRegion)
A list of mirrors can be found here. The default mirror is set to US.
Username to UUID
UUID uuid = UUIDAPI.getUUID("AeroPvP");
Would return the UUID object for AeroPvP.
You can also get a string alternative (which does not contain hyphens)
String uuid = UUIDAPI.getUUIDString("AeroPvP");
UUID to Username
String playerName = UUIDAPI.getUsername("a8889e3068b84ce8963f4ea259c3ebe3");
Would return:
njb_said
If the given username or UUID is invalid, NULL
would be returned!
To compile just run mvn clean package
or download the latest build from build.mc-api.net
There is a maven repository at build.mc-api.net/plugin/repository/everything
Maven Configuration:
<repositories>
<repository>
<id>mcapi</id>
<url>http://build.mc-api.net/plugin/repository/everything/</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>net.mcapi.uuid</groupId>
<artifactId>uuid-java</artifactId>
<version>1.0.0</version>
</dependency>
</dependencies>