all-minecraft
v1.0.14
Published
## Installation
Downloads
162
Maintainers
Keywords
Readme
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);