mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-10 10:30:13 +08:00
Do not check initialized when calling backendAccess
This commit is contained in:
parent
9c3af046c7
commit
824a72b2e7
@ -239,13 +239,7 @@ public interface MiraiConsoleImplementation : CoroutineScope {
|
||||
* @throws IllegalStateException 当前端实例不是 `this` 时抛出
|
||||
*/
|
||||
public val backendAccess: BackendAccess
|
||||
get() {
|
||||
if (instanceInitialized) {
|
||||
if (this === instance)
|
||||
return backendAccessInstance
|
||||
}
|
||||
throw IllegalStateException("Permission denied")
|
||||
}
|
||||
get() = backendAccessInstance
|
||||
|
||||
public companion object {
|
||||
private val backendAccessInstance = object : BackendAccess {
|
||||
|
Loading…
Reference in New Issue
Block a user