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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@baipiaodajun/mcbots

v1.2.7

Published

Minecraft bot and status dashboard for multi-server management

Readme

🛡️ Minecraft 保活机器人及监控面板 - @baipiaodajun/mcbots

特性

  • 多服务器配置:支持通过 SERVERS_JSON 文件一次性定义多个 MC 服务器,并为每个服务器自动创建对应的机器人连接。
  • 智能网络检测:支持连接超时监控,自动在 30 秒后尝试重连。
  • 实时监控面板:机器人运行状态即时更新,便于统一管理与观察。
  • 多实例支持:同一服务器可同时连接并管理多个机器人。
  • 可配置行为变量:通过设置 CHAT 与 MOVE 环境变量,灵活控制机器人聊天或移动行为。

用法

npx

export SERVERS_JSON='[{"host":"mc-yy.io","port":25565}]'
npx @baipiaodajun/mcbots

nodejs

新建一个 index.js 文件,内容如下: 其中内容替换成你自己的MC服务器地址和端口,其他可以根据情况改变,可以添加多台服务器。

process.env.SERVERS_JSON='[{"host":"mc-yy.io","port":25565,"minBots":1,"maxBots":3,"version":"1.20.1"},{"host":"mc-xx.io","port":25565,"minBots":1,"maxBots":3,"version":"1.20.1"}]';

const { initialize, shutdown } = require('@baipiaodajun/mcbots');

initialize().then(() => {
  console.log('mcbots start successed');
}).catch(err => {
  console.error('mcbots start fail:', err);
});

process.on('SIGINT', shutdown);
process.on('SIGTERM', shutdown);

再新建一个package.json,内容如下:

{
  "name": "mc",
  "version": "1.0.0",
  "description": "mcbots",
  "main": "index.js",
  "scripts": {
    "start": "node index.js"
  },
  "dependencies": {
    "@baipiaodajun/mcbots": "latest"
  }
}

接下来运行启动nodejs就可以

npm install && npm run start

docker

docker run -d \
  --name mcbot \
  -e SERVERS_JSON='[{"host":"mc-yy.io","port":25565,"minBots":1,"maxBots":3},{"host":"mc-xx.io","port":25565,"minBots":1,"maxBots":3}]' \
  -p 3000:3000 \
  mingli2038/mcbot:latest

新版本说明

  • 新版本引入了 热更新功能:SERVER_JSON
  • 目前该功能处于 实验状态,可能会导致一些 意料之外的问题
  • ~~如果需要稳定使用,推荐继续使用 1.1 版本~~
  • 1.2.4 优化机器人断开逻辑,避免幽灵机器人出现。
  • 1.2.5 根据群友建议加入服务备注,以便能够区分是哪一家服务器,因为一些服务器没有域名。
  • 1.2.6 mineflayer更新到4.35,得益于此,现在可以直连1.21.8-1.21.11的MC离线模式服务器而不需要通过兼容版本插件,mc版本|最大机器人数|最小机器人数变成可选项,有默认值,mc版本使用上游自动识别功能。
  • 1.2.7 现在可以直接使用npx来执行这个包。

页面更新

在页面底部新增了修复入口:
【更新 MC 机器人配置】

该页面涉及 服务器配置更新,因此所有操作均已加上认证。


密钥设置

  • 默认密钥可从 Telegram频道 获取
  • 也可以通过环境变量自行设置:
    • HOTUPDATE_SECRET:用于设置密钥
    • HOTUPDATE_SALT:用于加盐,防止彩虹表破解

来源

这个东西不是我的原创,思路来自Tweek白嫖群的[这种事可以花点钱]用户给的镜像ghcr.io/oprmg/mcbot:latest,我通过AI重构其实现并加入自己的想法从而重新发布出来。