Fix build

This commit is contained in:
Him188 2020-06-27 00:23:43 +08:00
parent e76cfe8c69
commit 9f8ce56f15
3 changed files with 4 additions and 10 deletions

View File

@ -13,8 +13,6 @@ package net.mamoe.mirai.console.plugin.jvm
import net.mamoe.mirai.console.plugin.internal.JvmPluginInternal import net.mamoe.mirai.console.plugin.internal.JvmPluginInternal
import net.mamoe.mirai.console.setting.Setting import net.mamoe.mirai.console.setting.Setting
import net.mamoe.mirai.console.setting.getValue
import net.mamoe.mirai.console.setting.value
import kotlin.coroutines.CoroutineContext import kotlin.coroutines.CoroutineContext
import kotlin.coroutines.EmptyCoroutineContext import kotlin.coroutines.EmptyCoroutineContext
@ -30,12 +28,4 @@ abstract class AbstractJvmPlugin @JvmOverloads constructor(
final override val name: String get() = this.description.name final override val name: String get() = this.description.name
override fun <T : Setting> getSetting(clazz: Class<T>): T = loader.settingStorage.load(this, clazz) override fun <T : Setting> getSetting(clazz: Class<T>): T = loader.settingStorage.load(this, clazz)
}
object MyPlugin : KotlinPlugin()
object TestSetting : Setting by MyPlugin.getSetting() {
val account by value("123456")
val password by value("123")
} }

View File

@ -55,6 +55,8 @@ interface Setting {
// TODO: 2020/6/26 document // TODO: 2020/6/26 document
val updaterSerializer: KSerializer<Unit> val updaterSerializer: KSerializer<Unit>
fun onValueChanged(value: Value<*>)
} }
//// region Setting_value_primitives CODEGEN //// //// region Setting_value_primitives CODEGEN ////

View File

@ -7,6 +7,8 @@
* https://github.com/mamoe/mirai/blob/master/LICENSE * https://github.com/mamoe/mirai/blob/master/LICENSE
*/ */
@file:Suppress("unused")
package net.mamoe.mirai.console.command package net.mamoe.mirai.console.command
import net.mamoe.mirai.contact.Member import net.mamoe.mirai.contact.Member