npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

mcexplore

v1.0.4-FIXES

Published

Get Information about Minecraft Player, Server & Minecraft itself.

Downloads

7

Readme

MCExplore

npm package

MCExplore is NPM Package which allows you to get various data about Minecraft Server, Minecraft Player & Minecraft Game itself.

Features

Player

  • Get Avatar
  • Get Skin (Download & View Links)
  • Get Username History
  • Get UUID
  • Get Cape

Server

  • Get List of Plugins
  • Get Software
  • Get Version
  • Get List of Players
  • Get Number of Players
  • Whether Server is Online
  • Get Hostname/IP from IP/Hostname

Minecraft

  • Get all Minecraft Items
  • Get all Minecraft Entities
  • Get all Minecraft Blocks
  • Get all Minecraft Biomes
  • Get list of Minecraft Versions

Installation

npm install mcexplore

Easy Usage

// Importing 'Client' as 'MCExplore' for better readability
const { Client: MCExplore } = require("mcexplore");

const mcExplorer = new MCExplore();

// Get all Server Information at once
mcExplorer.serverInfo.getServer("examplemc.com").then((result) => {
  console.log(result);
});

// Get all Player Information at once
mcExplorer.playerInfo.getPlayer("Notch").then((result) => {
  console.log(result);
});

Usage

For beginning, you need to initialize MCExplore Client as so:

// Importing 'Client' as 'MCExplore' for better readability
const { Client: MCExplore } = require("mcexplore");

// Specifying Server IP manually
const mcExplorer = new MCExplore();

// Specifying Server IP once
// const mcExplorer = new MCExplore({ ip: "example.com" });

and after that you can use methods on mcExplorer.

Server

Server methods accepts ip and (optional) platform parameters, where platform isn't required but can be Java or Bedrock.


Get all Server Information at once

mcExplorer.serverInfo.getServer(serverIp, platform?).then((result) => {
  console.log(result);
});

Get List of Plugins

mcExplorer.serverInfo.getPluginList(serverIp, platform?).then((result) => {
  console.log(result);
});

Get which Software Server's Using

mcExplorer.serverInfo.getSoftware(serverIp, platform?).then((result) => {
  console.log(result);
});

Get Server's Version(s)

mcExplorer.serverInfo.getVersion(serverIp, platform?).then((result) => {
  console.log(result);
});

Get list of Player's Playing on Server

mcExplorer.serverInfo.getPlayerNames(serverIp, platform?).then((result) => {
  console.log(result);
});

Get Number of Players online

mcExplorer.serverInfo.getOnlineCount(serverIp, platform?).then((result) => {
  console.log(result);
});

Check whether Server is online or offline

mcExplorer.serverInfo.isOnline(serverIp, platform?).then((result) => {
  console.log(result);
});

If IP is provided, Hostname, IP & Port will be returned. If Hostname is provided Hostname, IP & Port will be returned

mcExplorer.serverInfo.getIPHostname(serverIp, platform?).then((result) => {
  console.log(result);
});

Player

These methods accepts username parameter which is required.


Check whether Account exist

mcExplorer.playerInfo.accountExist(username).then((result) => {
  console.log(result);
});

Get all Player Information at once

mcExplorer.playerInfo.getPlayer(username).then((result) => {
  console.log(result);
});

Get Player's Avatar

mcExplorer.playerInfo.getAvatar(username).then((result) => {
  console.log(result);
});

Get Player's Username History

mcExplorer.playerInfo.getUsernameHistory(username).then((result) => {
  console.log(result);
});

Get Player's UUID

mcExplorer.playerInfo.getUUID(username).then((result) => {
  console.log(result);
});

Get Player's Skin (View & Download Links)

mcExplorer.playerInfo.getSkin(username).then((result) => {
  console.log(result);
});

Get Player's Cape

mcExplorer.playerInfo.getCape(username).then((result) => {
  console.log(result);
});

Minecraft

These methods accepts (optional) version parameter, defaults to latest Minecraft Version.


Get list of Minecraft Items

mcExplorer.minecraftInfo.getAllItems(version?).then((result) => {
  console.log(result);
});

Get list of Minecraft Entities

mcExplorer.minecraftInfo.getAllEntities(version?).then((result) => {
  console.log(result);
});

Get list of Minecraft Blocks

mcExplorer.minecraftInfo.getAllBlocks(version?).then((result) => {
  console.log(result);
});

Get list of Minecraft Biomes

mcExplorer.minecraftInfo.getAllBiomes(version?).then((result) => {
  console.log(result);
});

Get list of Minecraft Versions

mcExplorer.minecraftInfo.listOfVersions().then((result) => {
  console.log(result);
});

Find specific Biome

mcExplorer.minecraftInfo.getBiome("Plains").then((result) => {
  console.log(result);
});

Credits

  • PlayerDB: https://playerdb.co
  • Optifine: http://optifine.net
  • MCSrvStat.us: https://mcsrvstat.us
  • PrismarineJS' Github Repo: https://github.com/PrismarineJS/minecraft-data

Upcoming

  • Get Information about Specific Entity