mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-25 15:40:28 +08:00
Add Plugin.description
This commit is contained in:
parent
91e30377fc
commit
51ff1f91e9
@ -65,14 +65,7 @@ import kotlin.reflect.KType
|
||||
* val theList = AccountPluginData.list
|
||||
* ```
|
||||
*
|
||||
* 但也注意, 不要存储 `AccountPluginData.list`. 它可能受不到值跟踪.
|
||||
* 错误的示例:
|
||||
* ```
|
||||
*
|
||||
* class {
|
||||
*
|
||||
* }
|
||||
* ```
|
||||
* 但也注意, 不要存储 `AccountPluginData.list`. 它可能受不到值跟踪. 若必要存储, 请使用 [PluginData.findBackingFieldValue]
|
||||
*
|
||||
* ### 使用 Java
|
||||
*
|
||||
|
@ -39,6 +39,11 @@ public interface Plugin : CommandOwner {
|
||||
* 所属插件加载器实例, 此加载器必须能加载这个 [Plugin].
|
||||
*/
|
||||
public val loader: PluginLoader<*, *>
|
||||
|
||||
/**
|
||||
* 获取插件描述
|
||||
*/
|
||||
public val description: PluginDescription
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -43,7 +43,7 @@ public interface JvmPlugin : Plugin, CoroutineScope,
|
||||
public val logger: MiraiLogger
|
||||
|
||||
/** 插件描述 */
|
||||
public val description: JvmPluginDescription
|
||||
public override val description: JvmPluginDescription
|
||||
|
||||
/** 所属插件加载器实例 */
|
||||
@JvmDefault
|
||||
|
Loading…
Reference in New Issue
Block a user