Mirai-McPlugin
用mirai机器人获取麦克服务器信息并发送
1
Github Watches
5
Github Forks
34
Github Stars
Mirai-MCPingPlugin
用Mirai机器人获取MC服务器信息并发送
本项目开发时本人水平有欠缺,堆了代码屎山,请等待重构
这是一个做的很屑的 Mirai 机器人插件
现在下载MCPingV2.1(需自行载入库) 或 MCPingV2.1-lib(只需拷贝进plugins)
本README适用于MCPing2.1
主要功能
-
获取Minecraft服务器信息
注意事项
本插件的语法和编译版本为OracleJdk11
即你的java版本不能低于OracleJdk11 如有需要可获取本项目 重新编译
如果你使用中国移动家宽网络请务必更换更好的DNS
(比如8.8.8.8 114.114.114.114)
使用中国移动家宽网络默认DNS获取Srv时,若不存在Srv,则会堵塞15s
可能导致本插件不可用
指令和介绍
所有指令不分大小写
使用本插件,机器人会在群聊信息 中响应以下命令
-
/mcping <域名/IP>bot会发送该MC(JEBE)服务器的MOTD(所有人可用)
使用示例:/mcping mc.hypixel.net
另有一个指令为/mcMotd的命令(和MCPing一样)
你可以通过/mcPingCmd set <命令>修改它
PS:支持Srv和中文域名
-
/lp(主人/控制台可用)-
list获取主人列表 -
add<qq号>添加主人 -
remove<qq号>移除主人
使用示例:
/lp add 114514 -
2.0-Beta.3 移除了PIN码验证
新增了控制台操作,这样就可以直接在控制台获取 添加 移除 主人啦
在控制台输入指令时不需要 带"/"
-
/enable set <布尔值>(主人可用)
使用示例:/enable set true
可用该命令启用或停用本插件功能
停用后 只有/enable可用
-
/reload(主人可用)
使用该命令后,插件会重新读取配置文件载入到内存中
-
/bindServer(主人可用)-
list获取绑定列表 -
add<群号>命令域名/IP绑定一个服务器到群 -
remove<群号>解绑一个群
PS:可用"this"代指当前群,解绑时"all"可代指所有群
比如你在群号为114514的群发送:/bindServer add this /status mc.hypixel.net
机器人回复"绑定成功 可在该群发送 /status 获取mc.hypixel.net的信息"就说明绑定成功了
当有人在群号为
114514(刚刚那个)发送/status机器人就会发送mc.hypixel.net的服务器信息这点非常适合服主架设在自己的玩家群方便查询
用到的依赖
MX233/MinecraftServerPingMCJEMOTD获取库MX233/MinecraftServerPing-BEMCBEMOTD获取库alibaba/fastjson本插件不依赖,但协议库依赖TheFatCat/MiraiUtils非常好的命令系统snakeyaml我从spigot里拷贝出来的,就不知道出处了如果你不会寻找和调用这些
lib请下载带依赖版本(命名带-lib) -
可自定义性
你可以在data\MCPing下发现名称为typeset.txt和Betypeset.txt的文件,里面的文本是笔者预先设定的排版
typeset.txt为java版的Motd排版
Betypeset.txt为BE版的Motd排版
你可以~~~自♂由~~~排版
用记事本打开会乱 这玩意没格式化,建议用专业点的工具比如VSC
弄乱了不会弄回去可以删掉typeset.txt或Betypeset.txt然后/reload重载恢复
Java版Motd变量如下
-
%favicon表示发送图标,不加则不发送 -
%description描述文本 -
%version_name版本名称 -
%version_protocol版本协议号 -
%online_players在线玩家数量 -
%max_players最大玩家数量 -
%delay延迟(ms) -
%type类型(服务端) -
%mod_countmod数量 -
%mod_list模组列表 (相对1.0版本,此版本已改用合并转发聊天记录 理论上不会刷屏)
BE版Motd变量如下
-
%type类型(服务端) -
%delay延迟(ms) -
%version版本 -
%description描述 -
%default_mode默认模式 -
%protocol_num协议号 -
%online_players在线玩家数量 -
%max_players最大玩家数量 -
%world_name世界名称(仅BDS可用)
相关推荐
Confidential guide on numerology and astrology, based of GG33 Public information
Emulating Dr. Jordan B. Peterson's style in providing life advice and insights.
Your go-to expert in the Rust ecosystem, specializing in precise code interpretation, up-to-date crate version checking, and in-depth source code analysis. I offer accurate, context-aware insights for all your Rust programming questions.
Take an adjectivised noun, and create images making it progressively more adjective!
Reviews
user_FWbCZzI0
I have been using Mirai-MCPingPlugin by Pmaru-top for a while now, and it has significantly improved my experience. This plugin seamlessly integrates with my server setup, providing real-time ping monitoring and enhancing overall performance and stability. It's well-coded and easy to implement. If you are looking for a reliable solution for ping management in Minecraft, I highly recommend giving this plugin a try. Check it out on GitHub!