JSPM

  • Created
  • Published
  • Downloads 222
  • Score
    100M100P100Q80161F
  • License ISC

A package providing info on the EarthMC Minecraft server.

Package Exports

  • earthmc

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 (earthmc) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

EarthMC Package

Provides info on the EarthMC Minecraft server.

Installation

$ npm install earthmc

Require the package

var emc = require("earthmc")

Usage Example (Discord Bot)

 A test image

Methods

Get Player (Promise)

var player = await emc.getOnlinePlayer("PlayerName").then(player => { return player })

console.log(player)

// => { x: 0, y: 64, z: 0, isUnderground: true, nickname: 'PlayerNickname', name: 'PlayerName' } 

Get Resident (Promise)

var resident = await emc.getResident("ResidentName").then(resident => { return resident })

console.log(resident)

// => Not yet implemented!

Get Town (Promise)

var town = await emc.getTown("TownName").then(town => { return town })

console.log(town)

// => { area: 975, x: -352, z: -9904, name: 'London', nation: 'Britain', mayor: 'MineHero43', residents: ['MineHero43'...], pvp: false, mobs: false, public: false, explosion: false, fire: false, capital: true }

Get Nation (Promise)

var nation = await emc.getNation("NationName").then(nation => { return nation })

console.log(nation)

// => Not yet implemented!

Get Townless (Promise)

var townless = await emc.getTownless().then(array => { return array })

console.log(townless)

// => [{ x: 0, y: 64, z: 0, isUnderground: true, nickname: 'TownlessPlayer', name: 'TownlessPlayer' }, ...]