Commit bfc964f4 authored by Him188's avatar Him188

Add CoroutineScope to PluginBase

parent 3204f204
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() }
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment