[MCPing] - 让qq机器人获取并发送MC服务器信息
-
不多说,直接上github
https://github.com/MX233/Mirai-MCPingPlugin -
加载不了,报错怎么办,下面是日志
15:57:05 [INFO] iTXTech Mirai Console Loader version 1.1.0-bb5800f
15:57:05 [INFO] https://github.com/iTXTech/mirai-console-loader
15:57:05 [INFO] This program is licensed under GNU AGPL v3
15:57:05 [DEBUG] Loading script: announcement.js
15:57:05 [DEBUG] Loading script: boot.js
15:57:05 [DEBUG] Loading script: config.js
15:57:05 [DEBUG] Loading script: oraclejdk.js
15:57:05 [DEBUG] Loading script: repo.js
15:57:05 [DEBUG] Loading script: updater.js
15:57:06 [INFO] Fetching Mirai Console Loader Announcement...
15:57:07 [INFO] Mirai Console Loader Announcement:
Mirai Console Loader 公告栏[mirai-console] 最近, 项目组发现了权限系统可能会被错误的提前加载导致的3rd权限系统无法正确加载
于是决定, 于 2.6 起, 超前访问权限系统将得到一个错误并中断插件加载, 请各开发者及时检查
影响范围: https://github.com/mamoe/mirai-console/pull/307
15:57:07 [INFO] Verifying "net.mamoe:mirai-console" version 2.7-M2
15:57:08 [INFO] Verifying "net.mamoe:mirai-console-terminal" version 2.7-M2
15:57:08 [INFO] Verifying "net.mamoe:mirai-core-all" version 2.7-M2
15:57:09 [DEBUG] Boot Mirai Files: mirai-console-2.7-M2.jar, mirai-console-terminal-2.7-M2.jar, mirai-core-all-2.7-M2.jar; Args: ""
2021-07-21 15:57:11 I/main: Starting mirai-console...
2021-07-21 15:57:11 I/main: Backend: version 2.7-M2, built on 2021-07-06 21:43:31.
2021-07-21 15:57:11 I/main: Frontend Terminal: version 2.7-M2, provided by Mamoe Technologies
2021-07-21 15:57:11 I/main: Welcome to visit https://mirai.mamoe.net/
2021-07-21 15:57:11 I/plugin: Successfully loaded plugin Chat Command
2021-07-21 15:57:11 I/MCPing: ConfigPath: D:\Desktop\RCON-BOT\data\MCPing
2021-07-21 15:57:11 I/plugin: Cannot load plugin MCPing
2021-07-21 15:57:11 E/main: Failed to init MiraiConsole.
net.mamoe.mirai.console.plugin.loader.PluginLoadException: Exception while loading MCPing
at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl.load(BuiltInJvmPluginLoaderImpl.kt:110)
at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.load(JvmPluginLoader.kt)
at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.load(JvmPluginLoader.kt:36)
at net.mamoe.mirai.console.internal.plugin.PluginManagerImpl.loadPluginNoEnable(PluginManagerImpl.kt:85)
at net.mamoe.mirai.console.internal.plugin.PluginManagerImpl.loadAllPluginsUsingBuiltInLoaders$mirai_console(PluginManagerImpl.kt:141)
at net.mamoe.mirai.console.internal.MiraiConsoleImplementationBridge.doStart$mirai_console(MiraiConsoleImplementationBridge.kt:157)
at net.mamoe.mirai.console.MiraiConsoleImplementation$Companion.start(MiraiConsoleImplementation.kt:276)
at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon(MiraiConsoleTerminalLoader.kt:152)
at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon$default(MiraiConsoleTerminalLoader.kt:151)
at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.main(MiraiConsoleTerminalLoader.kt:47)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.itxtech.mcl.Utility.bootMirai(Utility.java:83)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.mozilla.javascript.MemberBox.invoke(MemberBox.java:138)
at org.mozilla.javascript.NativeJavaMethod.call(NativeJavaMethod.java:226)
at org.mozilla.javascript.Interpreter.interpretLoop(Interpreter.java:1692)
at org.mozilla.javascript.Interpreter.interpret(Interpreter.java:1013)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:109)
at org.mozilla.javascript.ContextFactory.doTopCall(ContextFactory.java:412)
at org.mozilla.javascript.ScriptRuntime.doTopCall(ScriptRuntime.java:3578)
at org.mozilla.javascript.InterpretedFunction.call(InterpretedFunction.java:107)
at org.mozilla.javascript.ArrowFunction.call(ArrowFunction.java:43)
at org.mozilla.javascript.InterfaceAdapter.invokeImpl(InterfaceAdapter.java:155)
at org.mozilla.javascript.InterfaceAdapter.lambda$invoke$0(InterfaceAdapter.java:105)
at org.mozilla.javascript.Context.call(Context.java:554)
at org.mozilla.javascript.ContextFactory.call(ContextFactory.java:522)
at org.mozilla.javascript.InterfaceAdapter.invoke(InterfaceAdapter.java:105)
at org.mozilla.javascript.jdk18.VMBridge_jdk18$1.invoke(VMBridge_jdk18.java:126)
at com.sun.proxy.$Proxy4.run(Unknown Source)
at org.itxtech.mcl.script.ScriptManager.phaseBoot(ScriptManager.java:101)
at org.itxtech.mcl.Loader.start(Loader.java:156)
at org.itxtech.mcl.Loader.main(Loader.java:66)
Caused by: java.lang.NoClassDefFoundError: com/alibaba/fastjson/JSONObject
at tax.cute.mcpingplugin.Config.createConfig(Config.java:112)
at tax.cute.mcpingplugin.Config.getConfig(Config.java:35)
at tax.cute.mcpingplugin.Plugin.onLoad(Plugin.java:44)
at net.mamoe.mirai.console.internal.plugin.JvmPluginInternal.internalOnLoad$mirai_console(JvmPluginInternal.kt:196)
at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl.load(BuiltInJvmPluginLoaderImpl.kt:108)
... 37 more
Caused by: java.lang.ClassNotFoundException: com.alibaba.fastjson.JSONObject
at net.mamoe.mirai.console.internal.plugin.JvmPluginClassLoader.findClass$mirai_console(JvmPluginClassLoader.kt:110)
at net.mamoe.mirai.console.internal.plugin.JvmPluginClassLoader.findClass(JvmPluginClassLoader.kt:51)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
... 42 more -
此回复已被删除! -
@baiyibs 看起来是缺库,项目介绍里面写有需要的库,下载然后让插件可以调用即可(例如-cp)
-
现已将依赖内置与插件内,重新下载Releases即可
-
此回复已被删除! -
感觉分开来比较好,现在Releases弄了两个版本,一个内置lib,另一个没有
-
此回复已被删除! -
@mx233 我又回来了,还是报错,不过是在查询过程中报错
/mcping mc.hypixel.net2021-07-22 10:52:31 E/main: Exception in coroutine <unnamed>
net.mamoe.mirai.event.ExceptionInEventHandlerException: Exception in EventHandler
at net.mamoe.mirai.internal.event.JvmMethodListenersInternalKt.registerEventHandler$callMethod$invokeWithErrorReport(JvmMethodListenersInternal.kt:147)
at net.mamoe.mirai.internal.event.JvmMethodListenersInternalKt.access$registerEventHandler$callMethod$invokeWithErrorReport(JvmMethodListenersInternal.kt:1)
at net.mamoe.mirai.internal.event.JvmMethodListenersInternalKt$registerEventHandler$callMethod$2.invokeSuspend(JvmMethodListenersInternal.kt:154)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
Caused by: java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at net.mamoe.mirai.internal.event.JvmMethodListenersInternalKt.registerEventHandler$callMethod$invokeWithErrorReport(JvmMethodListenersInternal.kt:140)
... 8 more
Caused by: java.lang.NullPointerException
at java.base/java.lang.String.replace(Unknown Source)
at tax.cute.mcpingplugin.Typeset.getTypeset(Typeset.java:47)
at tax.cute.mcpingplugin.Group.onMonitor(Group.java:96)
... 13 more -
@baiyibs 问题已经解决了,没安装依赖
-
@baiyibs 解决了,但是没完全解决,只成功运行一次又报错了,报错信息和刚才的一样
-
如提示所示,该服务器未开放默认TCP端口(25565)
-
@mx233 不能自定义端口吗?
-
-
@mx233 现在一直在报错,我们4台服务器只有一个mod服可以检测到,其他的全部报错
2021-07-22 11:18:19 E/main: Exception in coroutine <unnamed>
net.mamoe.mirai.event.ExceptionInEventHandlerException: Exception in EventHandler
at net.mamoe.mirai.internal.event.JvmMethodListenersInternalKt.registerEventHandler$callMethod$invokeWithErrorReport(JvmMethodListenersInternal.kt:147)
at net.mamoe.mirai.internal.event.JvmMethodListenersInternalKt.access$registerEventHandler$callMethod$invokeWithErrorReport(JvmMethodListenersInternal.kt:1)
at net.mamoe.mirai.internal.event.JvmMethodListenersInternalKt$registerEventHandler$callMethod$2.invokeSuspend(JvmMethodListenersInternal.kt:154)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:571)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:678)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:665)
Caused by: java.lang.reflect.InvocationTargetException
at jdk.internal.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at net.mamoe.mirai.internal.event.JvmMethodListenersInternalKt.registerEventHandler$callMethod$invokeWithErrorReport(JvmMethodListenersInternal.kt:140)
... 8 more
Caused by: java.lang.NullPointerException
at java.base/java.lang.String.replace(Unknown Source)
at tax.cute.mcpingplugin.Typeset.getTypeset(Typeset.java:47)
at tax.cute.mcpingplugin.Group.onMonitor(Group.java:58)
... 12 more -
@baiyibs 我又测试了一下其他服务器,好像不是默认端口的都报错
-
@baiyibs 好吧,插件的问题,服务器没有返回一些数据导致空指针 等会修复
-
修好了发Releases了 顺便更新下MinecraftServerPing 你需要最新版MinecraftServerPing依赖运行 不想找lib请直接下载带依赖版本 关于这个插件的问题请到https://github.com/MX233/Mirai-MCPingPlugin/issues提交
-
Imgur
我也做了一个类似的,已经成了最常用的命令了XD -
删除MCping插件和data内有关mcping内容之后启动还是会有MCPing的功能,有点神奇.
请问怎么彻底删除