1.0.4 • Published 5 years ago
mcinfo v1.0.4
mcinfo
A simple NodeJS library to get a Minecraft user's information
Minecraft Profile
Getting UUID
var mcinfo = require('mcinfo');
mcinfo.getMinecraftProfile('notch', function(profile) {
console.log(profile.id);
});
Getting Proper Name
var mcinfo = require('mcinfo');
mcinfo.getMinecraftProfile('notch', function(profile) {
console.log(profile.name);
});
Player Information
Getting Name
var mcinfo = require('mcinfo');
mcinfo.getPlayerInformation('069a79f444e94726a5befca90e38aaf5', function(player) {
console.log(player.name);
});
Getting Properties
var mcinfo = require('mcinfo');
mcinfo.getPlayerInformation('069a79f444e94726a5befca90e38aaf5', function(player) {
console.log(player.properties);
});
Player Validation
Checking if name is valid
var mcinfo = require('mcinfo');
mcinfo.isValid('notch', function(valid) {
if(valid) {
console.log('User notch is valid!');
} else {
console.log('User notch is not valid!');
}
});