mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-10 18:40:15 +08:00
Throw IllegalStateException when restarting MiraiConsoleImplementation
This commit is contained in:
parent
cd6e78d36c
commit
466b067d9f
@ -189,6 +189,7 @@ public interface MiraiConsoleImplementation : CoroutineScope {
|
||||
@ConsoleFrontEndImplementation
|
||||
@Throws(MalformedMiraiConsoleImplementationError::class)
|
||||
public fun MiraiConsoleImplementation.start(): Unit = initLock.withLock {
|
||||
if (::instance.isInitialized) error("Mirai Console is already initialized.")
|
||||
this@Companion.instance = this
|
||||
MiraiConsoleImplementationBridge.doStart()
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user