mojangjs
v2.0.3
Published
A simple package to get the UUID of a username
Downloads
49
Readme
mojangjs
A lightweight, simple way to get UUIDs of usernames.
Usage
Of course after running npm install mojangjs
the methods are simple.
All methods use Promise style callbacks as they are preferred.
Methods
getUUID(uuid)
- Gets the UUID of the player.
mojangjs.getUUID('Thorin').then(uuid => {
console.log(uuid);
}).catch(err => console.error(err));
nameHistory.byName(playername)
- Gets the name history of a player.
mojangjs.nameHistory.byName('Thorin').then(nameHistory => {
console.log(nameHistory);
}).catch(err => console.error(err));
nameHistory.byUUID(uuid)
- Gets the name history of a UUID.
mojangjs.nameHistory.byUUID('5de3d1d51a954fb3a2b788e4938ae11c').then(nameHistory => {
console.log(nameHistory);
}).catch(err => console.error(err));
statusCheck()
- Gets the current status from Mojang.
mojangjs.statusCheck().then(status => {
console.log(status);
}).catch(err => console.error(err));
getNameFromUUID(uuid)
- Gets the current playername from a UUID.
mojangjs.getNameFromUUID(uuid).then(name => {
console.log(name);
}).catch(err => console.error(err));