From 9adc4cde5563840a4c3f1710c28a6d06abd8790d Mon Sep 17 00:00:00 2001 From: Him188 Date: Fri, 23 Oct 2020 13:00:08 +0800 Subject: [PATCH] Do checkPluginDescription in SimpleJvmPluginDescription.init --- .../mamoe/mirai/console/plugin/jvm/JvmPluginDescription.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPluginDescription.kt b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPluginDescription.kt index 72c376b94..edf5d99af 100644 --- a/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPluginDescription.kt +++ b/backend/mirai-console/src/main/kotlin/net/mamoe/mirai/console/plugin/jvm/JvmPluginDescription.kt @@ -65,7 +65,7 @@ public interface JvmPluginDescription : PluginDescription { /** * @see [PluginDescription.version] */ - @ResolveContext(PLUGIN_VERSION) version: SemVersion, + version: SemVersion, /** * @see [PluginDescription.name] */ @@ -230,6 +230,6 @@ internal data class SimpleJvmPluginDescription ) : this(name, SemVersion(version), id, author, info, dependencies) init { - require(!name.contains(':')) { "':' is forbidden in plugin name" } + PluginDescription.checkPluginDescription(this) } } \ No newline at end of file