JSPM

minecraft-api

0.0.3
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 9
  • Score
    100M100P100Q52250F
  • License MIT

Package Exports

  • minecraft-api

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (minecraft-api) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

minecraft-api

minecraft-api is a simple wrapper around the Minecraft API. The package is really lightweight and does use Promises as return type.

Installation

npm install --save minecraft-api

Usage

MinecraftAPI.uuidForName(username)

Parameters:

  • username: The username to resolve the UUID for

Example:

const MinecraftAPI = require('minecraft-api');

function foo() {
    MinecraftAPI.uuidForName('jeb_')
        .then(uuid => console.log(uuid))
        .catch(err => console.log(err))
}

Example (async/await):

const MinecraftAPI = require('minecraft-api');

async function foo() {
    try{
        const uuid = await MinecraftAPI.uuidForName('jeb_');
        console.log(uuid);
    } catch(err){
        console.error(err);
    }
}