New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

minecraft-server-ping

Package Overview
Dependencies
Maintainers
0
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

minecraft-server-ping

Minecraft server status

latest
Source
npmnpm
Version
0.3.3
Version published
Maintainers
0
Created
Source

minecraft-ping

Minecraft server ping utility

Based on https://www.npmjs.com/package/minecraft-pinger javascript version.

Hostname & Port object and URL can be provided as direct value, with Promise or callback function (sync or async).

API Documentation

See API Documentation;

const data = await ping(); // localhost:25565
const data = await ping(Promise.resolve({hostname: 'eu.mineplex.com'}));
const data = await ping(() => {hostname: 'eu.mineplex.com', port: 25565});
const data = await ping(() => Promise.resolve({hostname: 'eu.mineplex.com', port: 25565}), {timeout: 100}); // timeout 100ms
const data = await pingUri('minecraft://eu.mineplex.com');
const data = await pingUri(new URL('minecraft://eu.mineplex.com:25565'));

or using Result

const result: Result<IMinecraftData, Error> = await pingUriResult('minecraft://eu.mineplex.com'); // or pingResult({server: 'eu.mineplex.com', port: 25565})
// with logic
if (result.isOk) {
	console.log(result.ok()); // IMinecraftData
} else {
	console.log(result.err().message); // Error message
}
// or with throw
const data: IMinecraftData = result.unwrap(); // throws error if Result is Error

Keywords

minecraft

FAQs

Package last updated on 08 Mar 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts