1.0.0 • Published 8 months ago

bedrock-api v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
8 months ago

BedrockAPI

The bedrock-api Node.js library is a powerful tool for both developers and Minecraft enthusiasts. It provides a simple and efficient way to obtain detailed information about a Minecraft Bedrock Edition server using only its IP address and port. With this library, you can access vital server statistics, player data, and more, making it an essential component for any Minecraft server monitoring or management system.

Key Features:

Server Information: Retrieve essential details about the Minecraft Bedrock server, including its version, MOTD (Message of the Day), IP address, ID (ping, server), and server name.

Player Data: Obtain the number of online players and the maximum number of players that the server can accommodate, enabling you to monitor player activity in real-time.

Server Status: Quickly check if the server is online and responsive, helping you ensure the availability of your Minecraft world.


Apache License

Documentation

const API = require('bedrock-api');
const api = new API();
const ip = 'play.nethergames.org';
const port = 19132;

Read our full documentation

Installation

Install with npm

  npm install bedrock-api

API Reference

Get all data

  .ping(ip, port, callback, timeout){}
ParameterTypeDescription
ipstringRequired. Your server adress.
portnumberRequired. Your server port.
callbackfunctionRequired. Function(err, res){}
timeoutnumberOptional. Response ping (default: 5000).

Get item

  .isOnline(ip, port, callback){}
  .getAckId(ip, port, callback){}
  .getMaxOnline(ip, port, callback){}
  .getOnline(ip, port, callback){}
  .getCleanName(ip, port, callback){}
  .getName(ip, port, callback){}
  .getVersion(ip, port, callback){}
  .getGame(ip, port, callback){}
  .getPingId(ip, port, callback){}
  .getServerId(ip, port, callback){}
  .getIp(ip, port, callback){}
  .getIpFamilly(ip, port, callback){}
ParameterTypeDescription
ipstringRequired. Your server adress.
portnumberRequired. Your server port.
callbackfunctionRequired. Function(error, result){}

Demo

https://github.com/JblusItsMe/bedrockApi/tree/main/test