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-unbanself

v0.1.3

Published

Minecraft Unbanself plugin for koishi

Readme

Koishi 插件:unbanself

📖 简介

本插件用于 Minecraft 服务器的自动账号解封功能,玩家可以通过指令 /unbanself <ID> 自助解除 LiteBans 封禁,仅限每日一定次数,支持控制封禁来源(如仅解封被 CONSOLE 封禁的账号)。

🛠 功能概览

  • ✅ 支持 /unbanself <ID> 指令解封 LiteBans 数据库中的账号
  • ✅ 支持 /uuid <ID> 查询离线 UUID
  • ✅ 支持 /unbanselfstatus [ID] 查看今日已使用的解封次数
  • ✅ 支持按发送用户与玩家账号双重限制每日次数
  • ✅ 支持判断封禁是否由 CONSOLE 执行
  • ✅ 所有日志输出为中文,详细记录每步流程
  • ✅ 使用原生 mysql 库,非连接池方式,兼容性更好

⚙️ 插件配置项

| 配置项 | 类型 | 默认值 | 说明 | |--------|------|--------|------| | mysql.host | string | 无 | 数据库 IP 地址 | | mysql.port | number | 3306 | 数据库端口 | | mysql.user | string | 无 | 数据库用户名 | | mysql.password | string | 无 | 数据库密码 | | mysql.database | string | 无 | 使用的数据库名称 | | dailyLimit | number | 1 | 每个用户和每个 Minecraft 账户每日解封次数 | | onlyConsoleBans | boolean | true | 是否仅允许被 CONSOLE 封禁的玩家解封 |

🧾 指令列表

  • /unbanself <ID>
    解封指定 Minecraft 账户,如果当日次数用尽或账号未被封禁,将返回提示。

  • /uuid <ID>
    获取指定 ID 的离线 UUID,供管理员调试使用。

  • /unbanselfstatus [ID]
    查看今日解封使用次数,如指定 ID 会额外显示该 Minecraft 账户的解封次数。

📝 数据表说明

插件自动在 Koishi 的 SQLite 中创建两个表用于次数统计:

  • unbanself_record: 用户 ID + 日期为主键,记录每个用户每日次数
  • unbanself_mcid: 账号 ID + 日期为主键,记录每个 Minecraft 账户每日次数

🧩 使用建议

  • 保证数据库账号有权限访问 litebans_bans
  • 若为分布式环境,请确保 UUID 计算一致性(采用离线模式 UUID)

📦 安装

pnpm add koishi-plugin-unbanself
# 或手动引入插件源码至项目中

💡 示例

/unbanself Airio_
/uuid Airio_
/unbanselfstatus Airio_