mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-10 18:40:15 +08:00
Fix deprecation message on PluginData implementations
This commit is contained in:
parent
91c5f5f134
commit
13a0444244
@ -24,7 +24,7 @@ import kotlinx.coroutines.Job
|
||||
* @see AutoSavePluginData
|
||||
*/
|
||||
public open class AutoSavePluginConfig : AutoSavePluginData, PluginConfig {
|
||||
@Deprecated("请手动指定保存名称. 此构造器将在 1.0.0 删除", level = DeprecationLevel.ERROR, replaceWith = ReplaceWith("AutoSavePluginConfig(\"改成保存的名称\")"))
|
||||
@Deprecated("请手动指定保存名称. 此构造器将在 1.0.0 删除", level = DeprecationLevel.ERROR, replaceWith = ReplaceWith("AutoSavePluginConfig(\"把我改成保存名称\")"))
|
||||
@Suppress("DEPRECATION_ERROR")
|
||||
public constructor() : super()
|
||||
|
||||
|
@ -30,7 +30,7 @@ import kotlin.reflect.full.findAnnotation
|
||||
* @see PluginData
|
||||
*/
|
||||
public open class AutoSavePluginData private constructor(
|
||||
@Suppress("UNUSED_PARAMETER") primaryConstructorMark: Any?
|
||||
@Suppress("UNUSED_PARAMETER") primaryConstructorMark: Any?,
|
||||
) : AbstractPluginData() {
|
||||
private lateinit var owner_: AutoSavePluginDataHolder
|
||||
private val autoSaveIntervalMillis_: LongRange get() = owner_.autoSaveIntervalMillis
|
||||
@ -45,7 +45,7 @@ public open class AutoSavePluginData private constructor(
|
||||
_saveName = saveName
|
||||
}
|
||||
|
||||
@Deprecated("请手动指定保存名称. 此构造器将在 1.0.0 删除", level = DeprecationLevel.ERROR, replaceWith = ReplaceWith("AutoSavePluginConfig"))
|
||||
@Deprecated("请手动指定保存名称. 此构造器将在 1.0.0 删除", level = DeprecationLevel.ERROR, replaceWith = ReplaceWith("AutoSavePluginData(\"把我改成保存名称\")"))
|
||||
public constructor() : this(null) {
|
||||
val clazz = this::class
|
||||
_saveName = clazz.findAnnotation<ValueName>()?.value
|
||||
@ -72,7 +72,7 @@ public open class AutoSavePluginData private constructor(
|
||||
?.let { return@invokeOnCompletion }
|
||||
MiraiConsole.mainLogger.error(
|
||||
"An exception occurred when saving config ${this@AutoSavePluginData::class.qualifiedNameOrTip} " +
|
||||
"but CoroutineExceptionHandler not found in PluginDataHolder.coroutineContext for ${owner::class.qualifiedNameOrTip}",
|
||||
"but CoroutineExceptionHandler not found in PluginDataHolder.coroutineContext for ${owner::class.qualifiedNameOrTip}",
|
||||
e
|
||||
)
|
||||
}
|
||||
|
@ -38,7 +38,7 @@ import net.mamoe.mirai.console.data.PluginData
|
||||
* @see PluginConfig
|
||||
*/
|
||||
public abstract class JAutoSavePluginConfig : AutoSavePluginConfig, PluginConfig {
|
||||
@Deprecated("请手动指定保存名称. 此构造器将在 1.0.0 删除", level = DeprecationLevel.ERROR, replaceWith = ReplaceWith("AutoSavePluginConfig(\"改成保存的名称\")"))
|
||||
@Deprecated("请手动指定保存名称. 此构造器将在 1.0.0 删除", level = DeprecationLevel.ERROR, replaceWith = ReplaceWith("JAutoSavePluginConfig(\"把我改成保存名称\")"))
|
||||
@Suppress("DEPRECATION_ERROR")
|
||||
public constructor() : super()
|
||||
|
||||
|
@ -67,7 +67,7 @@ import kotlin.reflect.full.createType
|
||||
* @see PluginData
|
||||
*/
|
||||
public abstract class JAutoSavePluginData : AutoSavePluginData, PluginConfig {
|
||||
@Deprecated("请手动指定保存名称. 此构造器将在 1.0.0 删除", level = DeprecationLevel.ERROR, replaceWith = ReplaceWith("AutoSavePluginConfig(\"改成保存的名称\")"))
|
||||
@Deprecated("请手动指定保存名称. 此构造器将在 1.0.0 删除", level = DeprecationLevel.ERROR, replaceWith = ReplaceWith("JAutoSavePluginData(\"把我改成保存名称\")"))
|
||||
@Suppress("DEPRECATION_ERROR")
|
||||
public constructor() : super()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user