mcinfo

1.0.4 • Public • Published

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!');
  }
});

Readme

Keywords

Package Sidebar

Install

npm i mcinfo

Weekly Downloads

1

Version

1.0.4

License

ISC

Unpacked Size

2.81 kB

Total Files

3

Last publish

Collaborators

  • sckiller