MCL - 模块化、轻量级且支持完全自定义的 mirai 加载器
-
Mirai Console Loader
模块化、轻量级且支持完全自定义的 mirai 加载器。
欢迎阅读自带脚本的说明,它将教会你如何
安装插件
,禁用和启用脚本
,修改包的更新频道
等基本操作。阅读文档 - 立即让您的插件支持从MCL安装
简介
iTX Technologies Mirai Console Loader
(下简称MCL
)采用模块化设计,包含以下几个基础模块:Script
脚本执行模块,用于加载和执行脚本,MCL
的主要功能均由脚本实现。脚本执行有各个阶段,详见注释。Config
配置文件模块,用于配置的持久化。Downloader
下载器模块,用于下载文件,并实时返回进度。Logger
日志模块,用于向控制台输出日志。
使用
iTXTech MCL
一键安装
iTXTech MCL Installer 能在所有操作系统上一键安装
iTXTech MCL
。手动安装
- 安装 Java 运行时(版本必须 >= 11)
- 从 Releases 下载最新版本的
MCL
- 解压到某处
- 在命令行中执行
.\mcl
以启动MCL
Mirai Repo
列表Maven Repo
列表Bintray
和JCenter
即将停止服务,请慎重选择托管服务。- Bintray - Him188moe -
mamoe
官方仓库,仅包含mirai
相关包 - JCenter -
mamoe
官方仓库会自动同步到JCenter
- Aliyun - 默认,阿里云
Maven
镜像,国内访问速度快 - HuaweiCloud - 华为云
Maven
镜像,阿里云不可用时的备选方案
开源许可证
Copyright (C) 2020-2021 iTX Technologies This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-
前往GitHub下载
现已可以通过mcl-installer一键升级
MCL 1.2.2
新特性
Logger
支持JavaScript抛出的NativeError
Logger
完整支持Ansi
- 默认禁用更新
其他
- 不再能通过命令行编辑
Maven Repos
MCL 1.2.1
MCL 1.2.0 为测试
Maven Central
可用性的版本。
现插件可以依赖MCL进行包管理等操作,范例见 mcl-addon。
implementation("org.itxtech:mirai-console-loader:1.2.1")
新特性
- 优化配置文件自动保存
- 支持锁定包版本
- 优化
AnsiLogger
控制台颜色 - 优化脚本日志,可在运行时被替换
- 优化脚本管理器,支持动态执行脚本
- 移除包或升级包时支持删除文件
- 默认安装 mcl-addon
MCL 1.1.0-beta.1
新特性
- 支持多个
Maven Repo
(#60 ) - 覆盖错误的
config.json
时会报错提示 - 支持调用
mirai console
中的jansi
用以显示控制台颜色
本版本稳定性未知,再经过大规模测试后才会通过
mcl-installer
推送 -
打cal!!!!!
-
centos7.8是不是不支持升级到8才可以用
-
MCL 1.2.2在Windows下该如何启用升级呢?
-
@superen 只要能运行Java11就可以运行
-
@rhwong 使用mcl-installer就可以升级mcl了(套娃)
-
@PeratX 我超 这娃套的(( 原来可以自动更新是怎么实现的呀
-
@PeratX 我还是想让他自动更新呜呜
-
大佬我现在想让它恢复成每次运行时自动检查mirai更新并下载安装更新该怎么弄啊?
-
哦 知道了 -u启动
-
冒个泡1111
-
我不配。。
-
出现错误求解决![]A8IT9]6]$Y6YG@WG3IJL@1.png](/assets/uploads/files/1651414089608-a8it9-6-y6yg-wg3ijl-1.png)
-
我携带-u命令循环自动重启
昨天重启后机器人无法正常使用,看提示要升级mcl2.0,升级后使用-u,mirai核心版本被从2.11.0-RC2降级更新到了2.10.3,并且无法启动,启动错误信息如下15:40:14 [INFO] iTXTech Mirai Console Loader version 2.0.1-b5303b5
15:40:14 [INFO] https://github.com/iTXTech/mirai-console-loader
15:40:14 [INFO] This program is licensed under GNU AGPL v3
15:40:16 [INFO] Mirai Console Loader Announcement:
Mirai Console Loader 公告栏如果在图片上传的时候遇到问题请与我们联系 (需要提供图片文件源本)
- 如 Unsupported image type for ExternalResource *
considering use gif/png/bmp/jpg format.
`- Tracker: https://github.com/mamoe/mirai/issues/new/choose常用资源整合
`- https://mirai.mamoe.net/topic/653如果无法获取Mirai-Repo信息, 例如启动时出现JSON解析错误
请升级到MCL 2.0 Beta并将 config.json 中的 Mirai-Repo 更改为 https://repo.itxtech.org15:40:16 [INFO] Verifying "net.mamoe:mirai-console" v2.10.3
15:40:16 [INFO] Verifying "net.mamoe:mirai-console-terminal" v2.10.3
15:40:16 [INFO] Verifying "net.mamoe:mirai-core-all" v2.10.3
15:40:16 [INFO] Verifying "org.itxtech:mcl-addon" v2.0.2
2022-05-10 15:40:17 I/main: Starting mirai-console...
2022-05-10 15:40:17 I/main: Backend: version 2.10.3, built on 2022-05-08 17:33:45.
2022-05-10 15:40:17 I/main: Frontend Terminal: version 2.10.3, provided by Mamoe Technologies
2022-05-10 15:40:17 I/main: Welcome to visit https://mirai.mamoe.net/
2022-05-10 15:40:18 I/plugin: Successfully loaded plugin MCL Addon v1.2.2
2022-05-10 15:40:18 I/plugin: Cannot load plugin MCL Addon v1.2.2
2022-05-10 15:40:18 E/main: Failed to init MiraiConsole.
java.lang.IllegalStateException: Plugin 'MCL Addon' is already loaded and cannot be reloaded.
at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl.load(BuiltInJvmPluginLoaderImpl.kt:144)
at net.mamoe.mirai.console.internal.plugin.BuiltInJvmPluginLoaderImpl.load(BuiltInJvmPluginLoaderImpl.kt:36)
at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.load(JvmPluginLoader.kt)
at net.mamoe.mirai.console.plugin.jvm.JvmPluginLoader$BuiltIn.load(JvmPluginLoader.kt:47)
at net.mamoe.mirai.console.internal.plugin.PluginManagerImpl.loadPluginNoEnable(PluginManagerImpl.kt:90)
at net.mamoe.mirai.console.internal.plugin.PluginManagerImpl.loadAllPluginsUsingBuiltInLoaders$mirai_console(PluginManagerImpl.kt:146)
at net.mamoe.mirai.console.internal.MiraiConsoleImplementationBridge.doStart$mirai_console(MiraiConsoleImplementationBridge.kt:151)
at net.mamoe.mirai.console.MiraiConsoleImplementation$Companion.start(MiraiConsoleImplementation.kt:401)
at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon(MiraiConsoleTerminalLoader.kt:156)
at net.mamoe.mirai.console.terminal.MiraiConsoleTerminalLoader.startAsDaemon$default(MiraiConsoleTerminalLoader.kt:155)
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.bootJars(Utility.java:89)
at org.itxtech.mcl.Utility.bootJars(Utility.java:79)
at org.itxtech.mcl.Utility.bootMirai(Utility.java:101)
at org.itxtech.mcl.module.builtin.Boot.boot(Boot.java:109)
at org.itxtech.mcl.module.ModuleManager.phaseBoot(ModuleManager.java:148)
at org.itxtech.mcl.Loader.lambda$start$4(Loader.java:189)
at org.itxtech.mcl.Loader.tryCatching(Loader.java:146)
at org.itxtech.mcl.Loader.start(Loader.java:189)
at org.itxtech.mcl.Loader.main(Loader.java:79) -
这是没有更换mcl前的报错
06:32:32 [INFO] iTXTech Mirai Console Loader version 1.2.3-93ac7d8
06:32:32 [INFO] https://github.com/iTXTech/mirai-console-loader
06:32:32 [INFO] This program is licensed under GNU AGPL v3
06:32:33 [INFO] Fetching Mirai Console Loader Announcement...
06:32:34 [INFO] Mirai Console Loader Announcement:
Mirai Console Loader 公告栏如果在图片上传的时候遇到问题请与我们联系 (需要提供图片文件源本)
- 如 Unsupported image type for ExternalResource *
considering use gif/png/bmp/jpg format.
`- Tracker: https://github.com/mamoe/mirai/issues/new/choose常用资源整合
`- https://mirai.mamoe.net/topic/653如果无法获取Mirai-Repo信息, 例如启动时出现JSON解析错误
请升级到MCL 2.0 Beta并将 config.json 中的 Mirai-Repo 更改为 https://repo.itxtech.org06:32:34 [INFO] Verifying "org.bouncycastle:bcprov-jdk15on" v1.64
06:32:34 [INFO] Verifying "net.mamoe:mirai-console" v2.11.0-RC2
06:32:35 [INFO] Verifying "net.mamoe:mirai-console-terminal" v2.11.0-RC2
06:32:35 [INFO] Verifying "net.mamoe:mirai-core-all" v2.11.0-RC2
06:32:35 [INFO] Verifying "org.itxtech:mcl-addon" v1.2.2
06:32:35 [ERROR] java.lang.NoClassDefFoundError: kotlinx/coroutines/CoroutineScope
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(Unknown Source)
at java.base/java.security.SecureClassLoader.defineClass(Unknown Source)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(Unknown Source)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(Unknown Source)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(Unknown Source)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(Unknown Source)
at java.base/java.security.SecureClassLoader.defineClass(Unknown Source)
at java.base/jdk.internal.loader.BuiltinClassLoader.defineClass(Unknown Source)
at java.base/jdk.internal.loader.BuiltinClassLoader.findClassOnClassPathOrNull(Unknown Source)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(Unknown Source)
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
at java.base/java.lang.Class.getDeclaredMethods0(Native Method)
at java.base/java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.base/java.lang.Class.getMethodsRecursive(Unknown Source)
at java.base/java.lang.Class.getMethod0(Unknown Source)
at java.base/java.lang.Class.getMethod(Unknown Source)
at org.itxtech.mcl.Utility.lambda$bootJars$0(Utility.java:81)
at org.itxtech.mcl.Utility.bootJars(Utility.java:88)
at org.itxtech.mcl.Utility.bootJars(Utility.java:79)
at org.itxtech.mcl.Utility.bootMirai(Utility.java:103)
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:106)
at org.itxtech.mcl.Loader.lambda$start$3(Loader.java:178)
at org.itxtech.mcl.Loader.tryCatching(Loader.java:147)
at org.itxtech.mcl.Loader.start(Loader.java:178)
at org.itxtech.mcl.Loader.main(Loader.java:70)
Caused by: java.lang.ClassNotFoundException: kotlinx.coroutines.CoroutineScope
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Unknown Source)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(Unknown Source)
at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
... 52 more -
检查后发现mcl-addon-1.2.2.jar没有删除,还是默认在加载这个导致的
-
大佬,你更新之后我需要每次都重新下mcl这个启动bat么?
-
mcl-install运行报错
Fetching iTXTech MCL Package Info from https://mirai.mamoe.net/assets/mcl/org/itxtech/mcl/package.json [src/main.rs:335:10] Error: error sending request for url (https://mirai.mamoe.net/assets/mcl/org/itxtech/mcl/package.json): error trying to connect: dns error: failed to lookup address information: Try again
改了dns 设置了代理也没有用,求大佬帮忙
-
@redeathgun 在 MCL - 模块化、轻量级且支持完全自定义的 mirai 加载器 中说:
[src/main.rs:335:10] Error: error sending request for url (https://mirai.mamoe.net/assets/mcl/org/itxtech/mcl/package.json): error trying to connect: dns error: failed to lookup address information: Try again
刷新 DNS 缓存了吗