mirror of
https://github.com/mamoe/mirai.git
synced 2025-01-22 13:46:13 +08:00
Add CoroutineScope to PluginBase
This commit is contained in:
parent
3204f20439
commit
bfc964f4f3
@ -1,5 +1,6 @@
|
||||
package net.mamoe.mirai.plugin
|
||||
|
||||
import kotlinx.coroutines.CoroutineScope
|
||||
import net.mamoe.mirai.Bot
|
||||
import net.mamoe.mirai.utils.DefaultLogger
|
||||
import net.mamoe.mirai.utils.io.encodeToString
|
||||
@ -7,9 +8,13 @@ import java.io.File
|
||||
import java.net.URL
|
||||
import java.net.URLClassLoader
|
||||
import java.util.jar.JarFile
|
||||
import kotlin.coroutines.CoroutineContext
|
||||
import kotlin.coroutines.EmptyCoroutineContext
|
||||
|
||||
|
||||
abstract class PluginBase constructor() {
|
||||
abstract class PluginBase : CoroutineScope {
|
||||
override val coroutineContext: CoroutineContext = EmptyCoroutineContext
|
||||
|
||||
val dataFolder: File by lazy {
|
||||
File(PluginManager.pluginsPath + pluginDescription.name).also { it.mkdir() }
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user