Skip to content

Commit 39be016

Browse files
committed
build: 2.1.3
1 parent 8dd3e1d commit 39be016

File tree

2 files changed

+6
-16
lines changed

2 files changed

+6
-16
lines changed

build.gradle.kts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ plugins {
77
}
88

99
group = "xyz.cssxsh"
10-
version = "2.1.2"
10+
version = "2.1.3"
1111

1212
mavenCentralPublish {
1313
useCentralS01()

src/main/kotlin/xyz/cssxsh/mirai/arknights/ArknightsHelperPlugin.kt

+5-15
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,22 @@ import net.mamoe.mirai.console.data.*
88
import net.mamoe.mirai.console.extension.*
99
import net.mamoe.mirai.console.plugin.jvm.*
1010
import net.mamoe.mirai.event.*
11-
import net.mamoe.mirai.utils.*
1211
import xyz.cssxsh.arknights.*
1312
import kotlin.collections.*
1413

1514
public object ArknightsHelperPlugin : KotlinPlugin(
16-
JvmPluginDescription("xyz.cssxsh.mirai.plugin.arknights-helper", "2.1.2") {
15+
JvmPluginDescription("xyz.cssxsh.mirai.plugin.arknights-helper", "2.1.3") {
1716
name("arknights-helper")
1817
author("cssxsh")
1918

2019
dependsOn("xyz.cssxsh.mirai.plugin.meme-helper", true)
2120
}
2221
) {
2322

24-
private val commands: List<Command> by spi()
25-
private val config: List<PluginConfig> by spi()
26-
private val data: List<PluginData> by spi()
27-
private val listeners: List<ListenerHost> by spi()
28-
29-
@Suppress("INVISIBLE_MEMBER")
30-
private inline fun <reified T : Any> spi(): Lazy<List<T>> = lazy {
31-
with(net.mamoe.mirai.console.internal.util.PluginServiceHelper) {
32-
jvmPluginClasspath.pluginClassLoader
33-
.findServices<T>()
34-
.loadAllServices()
35-
}
36-
}
23+
private val commands: List<Command> by services()
24+
private val config: List<PluginConfig> by services()
25+
private val data: List<PluginData> by services()
26+
private val listeners: List<ListenerHost> by services()
3727

3828
init {
3929
System.setProperty(IGNORE_UNKNOWN_KEYS, "true")

0 commit comments

Comments
 (0)