这是官方插件包之一,通过Uapis提供的接口获取用户账户信息
使用包管理器安装
在项目的插件目录下, 打开命令行, 根据你使用的包管理器, 输入相应的安装命令pip
pip install axtbot-plugin-minecraft
pdm
pdm add axtbot-plugin-minecraft
poetry
poetry add axtbot-plugin-minecraft
使用源码安装
在项目的插件目录下,打开命令行,输入以下内容 ```bash git clone https://github.com/AxT-Team/axtbot-plugin-minecraft ```把src中的文件夹拷贝至插件目录下
打开项目根目录下的 pyproject.toml 文件, 在 [tool.axtbot] 部分追加写入
plugins = ["axtbot_plugin_minecraft"]
安装完毕后,需要在 .env 中配置如下内容:
UAPI_KEY=uapi-xxxxxxxxxxxxxxxxxxxxxxxxNote
对应的Uapi Key请在 Uapis 注册获取并生成API KEY 填入此处!
若使用 /hyp 则需要在 data 目录下新增 config.json 并配置:
使用 /mc 获取菜单
{ "hypixel": { "resource": "hypixel.json", // 本地化资源文件名 (resources/ 下) "api_key": "你的 Hypixel API Key", // 在 https://developer.hypixel.net 申请 "timezone_offset": 28800 // 时间显示时区偏移(秒), 28800 = UTC+8 }, "staffs": ["管理员用户ID"], // 管理员不受冷却限制 "cooldown": 10, // 每用户查询冷却(秒) "cooldown_message": "获取速度太快了啦!" // 冷却期间的提示 }