all-minecraft
TypeScript icon, indicating that this package has built-in type declarations

1.0.14 • Public • Published

Discord NPM

all-minecraft

Installation

# NPM
npm install --save all-minecraft

# Yarn
yarn add all-minecraft

Usage

// ES5
const allMinecraft = require("all-minecraft");

// ES6
import allMinecraft from "all-minecraft";

Server Information

MinecraftServerInfo.serverInfo

const { MinecraftServerInfo } = require("all-minecraft");
const server = new MinecraftServerInfo({
  serverIp: "pika.host",
});
server.serverInfo().then(console.log);
Expected Output

MinecraftServerInfo.query

const server = new MinecraftServerInfo({
  serverIp: "lobby.freecraft.eu",
  queryPort: 25555,
});
server.query().then(console.log);
Expected Output

Others

const server = new MinecraftServerInfo({
  serverIp: "darklegacymc.tk",
});
console.log("Favicon: " + server.favicon());
console.log("Banner: " + server.getBannerURL({ title: "DarkLegacyMC" }));
console.log("IP: " + server.getServerIp);
console.log("Port: " + server.getServerPort);
Expected Output

Player Information

MinecraftPlayerInfo.getHead

const { MinecraftPlayerInfo } = require("all-minecraft");
const player = new MinecraftPlayerInfo({
  usernameOrUUID: "mallusrgreat",
});
console.log(
  player.getHead({
    extension: "png",
    helm: false,
    size: 100,
    facing: "left", // Facing is only for isometric
  })
);
Expected Output

MinecraftPlayerInfo.getSkin

console.log(
  player.getSkin({
    extension: "png",
    helm: false,
    size: 100,
    facing: "left", // Facing is only for isometric version
  })
);
Expected Output

MinecraftPlayerInfo.getPlayerInfo

player.getPlayerInfo().then(console.log);
Expected Output

Other

console.log("Username / UUID Specified in constructor: " + player.getUsernameOrUUID);
Expected Output

That's it! You're done

Readme

Keywords

Package Sidebar

Install

npm i all-minecraft

Weekly Downloads

53

Version

1.0.14

License

MIT

Unpacked Size

55.6 kB

Total Files

60

Last publish

Collaborators

  • mallusrgreat