statcraft-lib
v1.2.2
Published
A easy to use package for fetching information from any Minecraft server.
Downloads
4
Readme
Statcraft-lib
A easy to use package for fetching information from any Minecraft server.
How to install :
npm install statcraft-lib --save
Examples
Getting a list of players and total amount of players from a server:
var statcraft = require("statcraft-lib");
console.log(statcraft.list("192.99.160.99", "25565"));
--Outputs a object with properties total(integer) and players(array)
Functions
list(ip, port) -- outputs a object with properties total(integer) and players(array)
online(ip, port) -- outputs a object with property result, with true for online, and false for offline
version(ip, port) -- outputs a object with property result holding the current MC version of the server
max_players(ip, port) -- outputs a object with property result holding max amount of players
motd(ip, port) -- outputs a object with property result holding the message of the day
all(ip, port) -- outputs a object containing all available information
head(ver, size, loc) -- This function returns a 2d image of the avatar of a players head. -- ver = uuid or player name -- size = reqested size of png -- loc = location to download
perspective_head(ver, size, loc) -- This function returns a 3d image of the avatar of a players head. -- ver = uuid or player name -- size = reqested size of png -- loc = location to download