mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-10 18:40:15 +08:00
Update comments
This commit is contained in:
parent
7c863e9353
commit
825332abfe
@ -31,7 +31,6 @@ import net.mamoe.mirai.message.data.Message
|
|||||||
import net.mamoe.mirai.utils.BotConfiguration
|
import net.mamoe.mirai.utils.BotConfiguration
|
||||||
import net.mamoe.mirai.utils.LoginSolver
|
import net.mamoe.mirai.utils.LoginSolver
|
||||||
import net.mamoe.mirai.utils.MiraiLogger
|
import net.mamoe.mirai.utils.MiraiLogger
|
||||||
import java.lang.IllegalStateException
|
|
||||||
import java.nio.file.Path
|
import java.nio.file.Path
|
||||||
import java.util.*
|
import java.util.*
|
||||||
import java.util.concurrent.locks.ReentrantLock
|
import java.util.concurrent.locks.ReentrantLock
|
||||||
@ -193,32 +192,54 @@ public interface MiraiConsoleImplementation : CoroutineScope {
|
|||||||
/// Hooks & Backend Access
|
/// Hooks & Backend Access
|
||||||
/**
|
/**
|
||||||
* 后端 在 [phase] 阶段执行前会调用此方法, 如果此方法抛出了一个错误会直接中断 console 初始化
|
* 后端 在 [phase] 阶段执行前会调用此方法, 如果此方法抛出了一个错误会直接中断 console 初始化
|
||||||
|
*
|
||||||
|
* @since 2.5.0-dev-2
|
||||||
*/
|
*/
|
||||||
public fun prePhase(phase: String) {}
|
public fun prePhase(phase: String) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 后端 在 [phase] 阶段执行后会调用此方法, 如果此方法抛出了一个错误会直接中断 console 初始化
|
* 后端 在 [phase] 阶段执行后会调用此方法, 如果此方法抛出了一个错误会直接中断 console 初始化
|
||||||
|
*
|
||||||
|
* @since 2.5.0-dev-2
|
||||||
*/
|
*/
|
||||||
public fun postPhase(phase: String) {}
|
public fun postPhase(phase: String) {}
|
||||||
|
|
||||||
/** 后端在 [start] 前会调用此方法 */
|
/**
|
||||||
|
* 后端在 [start] 前会调用此方法
|
||||||
|
*
|
||||||
|
* @since 2.5.0-dev-2
|
||||||
|
*/
|
||||||
public fun preStart() {}
|
public fun preStart() {}
|
||||||
|
|
||||||
/** 后端在 [start] 后会调用此方法 */
|
/**
|
||||||
|
* 后端在 [start] 后会调用此方法
|
||||||
|
*
|
||||||
|
* @since 2.5.0-dev-2
|
||||||
|
*/
|
||||||
public fun postStart() {}
|
public fun postStart() {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用于提供前端访问后端内部实现
|
* 前端访问后端内部实现的桥
|
||||||
|
*
|
||||||
|
* @see backendAccess
|
||||||
|
* @since 2.5.0-dev-2
|
||||||
*/
|
*/
|
||||||
@ConsoleFrontEndImplementation
|
@ConsoleFrontEndImplementation
|
||||||
public interface BackendAccess {
|
public interface BackendAccess {
|
||||||
// GlobalComponentStorage
|
// GlobalComponentStorage
|
||||||
public val globalComponentStorage: ComponentStorage
|
public val globalComponentStorage: ComponentStorage
|
||||||
|
|
||||||
// PluginManagerImpl.resolvedPlugins
|
// PluginManagerImpl.resolvedPlugins
|
||||||
public val resolvedPlugins: MutableList<Plugin>
|
public val resolvedPlugins: MutableList<Plugin>
|
||||||
}
|
}
|
||||||
|
|
||||||
public val backendAccess: BackendAccess get() {
|
/**
|
||||||
|
* @see BackendAccess
|
||||||
|
* @since 2.5.0-dev-2
|
||||||
|
* @throws IllegalStateException 当前端实例不是 `this` 时抛出
|
||||||
|
*/
|
||||||
|
public val backendAccess: BackendAccess
|
||||||
|
get() {
|
||||||
if (instanceInitialized) {
|
if (instanceInitialized) {
|
||||||
if (this === instance)
|
if (this === instance)
|
||||||
return backendAccessInstance
|
return backendAccessInstance
|
||||||
|
Loading…
Reference in New Issue
Block a user