mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-11 02:50:15 +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` 时抛出
|
* @throws IllegalStateException 当前端实例不是 `this` 时抛出
|
||||||
*/
|
*/
|
||||||
public val backendAccess: BackendAccess
|
public val backendAccess: BackendAccess
|
||||||
get() {
|
get() = backendAccessInstance
|
||||||
if (instanceInitialized) {
|
|
||||||
if (this === instance)
|
|
||||||
return backendAccessInstance
|
|
||||||
}
|
|
||||||
throw IllegalStateException("Permission denied")
|
|
||||||
}
|
|
||||||
|
|
||||||
public companion object {
|
public companion object {
|
||||||
private val backendAccessInstance = object : BackendAccess {
|
private val backendAccessInstance = object : BackendAccess {
|
||||||
|
Loading…
Reference in New Issue
Block a user