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

koishi-plugin-minecraft-command

v1.0.3

Published

Execute Minecraft server commands from chat platforms via koishi-plugin-minecraft-adapter

Readme

koishi-plugin-minecraft-command

Koishi 的 Minecraft 服务器命令插件,通过聊天平台远程执行 Minecraft 服务器命令。需配合 koishi-plugin-minecraft-adapter 使用。

功能特性

  • 在线玩家查询: 查看服务器在线玩家列表
  • 消息广播: 在 Minecraft 服务器中广播消息
  • 玩家传送: 传送玩家到指定位置或其他玩家
  • 物品给予: 给予玩家指定物品
  • 天气控制: 设置服务器天气(晴天/雨天/雷暴)
  • 时间控制: 设置服务器时间(白天/黑夜/自定义游戏刻)
  • 自定义命令: 执行任意 Minecraft 服务器命令
  • 权限管理: 基于 Koishi 内置权限系统的分级权限控制
  • 中文别名: 所有命令均支持中文别名

前置需求

安装

npm install koishi-plugin-minecraft-command

配置

| 配置项 | 类型 | 默认值 | 说明 | |--------|------|--------|------| | botId | string | '' | 指定 Minecraft Bot ID(selfId),留空则自动选择第一个可用的 Minecraft Bot | | userAuthority | number | 1 | 普通命令(mc.list / mc.say)所需的 Koishi 用户权限等级 | | adminAuthority | number | 3 | 管理命令(mc.tp / mc.give / mc.weather / mc.time / mc.cmd)所需的 Koishi 用户权限等级 |

配置示例

plugins:
  minecraft-command:
    botId: ''
    userAuthority: 1
    adminAuthority: 3

命令列表

普通命令

普通命令需要用户权限等级 >= userAuthority(默认 1)。

| 命令 | 中文别名 | 说明 | 示例 | |------|----------|------|------| | mc.list | mc.在线 | 查看在线玩家 | mc.list | | mc.say <消息> | mc.广播 | 在服务器中广播消息 | mc.say 大家好 |

管理命令

管理命令需要用户权限等级 >= adminAuthority(默认 3)。

| 命令 | 中文别名 | 说明 | 示例 | |------|----------|------|------| | mc.tp <玩家> <目标> | mc.传送 | 传送玩家到目标位置或玩家 | mc.tp Steve Alexmc.tp Steve 100 64 200 | | mc.give <玩家> <物品> [数量] | mc.给予 | 给予玩家物品 | mc.give Steve diamond 64 | | mc.weather <类型> | mc.天气 | 设置服务器天气 | mc.weather clear | | mc.time <值> | mc.时间 | 设置服务器时间 | mc.time daymc.time 6000 | | mc.cmd <命令> | mc.命令 | 执行任意服务器命令 | mc.cmd op Steve |

天气类型

| 值 | 说明 | |----|------| | clear | 晴天 | | rain | 雨天 | | thunder | 雷暴 |

时间值

| 值 | 说明 | |----|------| | day | 白天 | | night | 黑夜 | | noon | 正午 | | midnight | 午夜 | | 数字 | 游戏刻(如 6000) |

权限说明

本插件使用 Koishi 内置权限系统,通过用户的 authority(权限等级)控制命令访问。

权限等级

| 等级 | 说明 | 可用命令 | |------|------|----------| | 0 | 未授权用户 | 无 | | 1(默认 userAuthority) | 普通用户 | mc.listmc.say | | 3(默认 adminAuthority) | 管理员 | 所有命令 |

可通过插件配置调整 userAuthorityadminAuthority 的值。

如何设置用户权限

  1. 通过 Koishi 控制台:在「用户管理」页面找到目标用户,修改其 authority 字段
  2. 通过 authorize 命令(需安装 admin 插件):
    authorize 3 -u @用户

推荐配置

# 默认配置即可满足大多数场景
minecraft-command:
  userAuthority: 1    # 普通用户可执行查询和广播
  adminAuthority: 3   # 管理员可执行传送、给予、天气、时间等管理命令

相关项目

链接

许可证

MIT