Skip to content
This repository has been archived by the owner on Jan 8, 2023. It is now read-only.

Commit

Permalink
修复路径问题( #2 )和潜在的包路径冲突问题,更新版本
Browse files Browse the repository at this point in the history
  • Loading branch information
Nambers committed May 10, 2021
1 parent 5ba5744 commit d8f3f36
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 12 deletions.
10 changes: 5 additions & 5 deletions build.gradle.kts
@@ -1,18 +1,18 @@
plugins {
val kotlinVersion = "1.4.30"
val kotlinVersion = "1.4.31"
kotlin("jvm") version kotlinVersion
kotlin("plugin.serialization") version kotlinVersion
id("net.mamoe.mirai-console") version "2.5.0"
id("net.mamoe.mirai-console") version "2.6.2"
}

group = "tech.Eritque_arcus"
version = "1.1.0"
version = "1.2.0"

repositories {
maven{ url =uri("https://maven.aliyun.com/nexus/content/groups/public/")}
jcenter()
mavenCentral()
mavenLocal()
maven{ url =uri("https://maven.aliyun.com/nexus/content/groups/public/")}
google()
}
dependencies{
//在IDE内运行的mcl添加滑块模块,请参考https://github.com/project-mirai/mirai-login-solver-selenium把版本更新为最新
Expand Down
11 changes: 5 additions & 6 deletions src/main/kotlin/PluginMain.kt
@@ -1,6 +1,5 @@
package org.example.mirai.plugin
package tech.eritquearcus.tuling

import kotlinx.serialization.json.JsonObject
import net.mamoe.mirai.console.plugin.jvm.JvmPluginDescription
import net.mamoe.mirai.console.plugin.jvm.KotlinPlugin
import net.mamoe.mirai.event.events.FriendMessageEvent
Expand All @@ -20,9 +19,9 @@ import java.nio.charset.StandardCharsets

object PluginMain : KotlinPlugin(
JvmPluginDescription(
id = "tech.Eritquearcus.TuLingBot",
id = "tech.eritquearcus.TuLingBot",
name = "TuLingBot",
version = "1.1.0"
version = "1.2.0"
)
) {
private var apikey = ""
Expand All @@ -42,10 +41,10 @@ object PluginMain : KotlinPlugin(
}
override fun onEnable() {
//配置文件目录 "${dataFolder.absolutePath}/"
val file = File("${dataFolder.absolutePath}\\config.json")
val file = File(dataFolder.absolutePath, "config.json")
logger.info("配置文件目录 \"${dataFolder.absolutePath}\"")
if(!file.exists()){
logger.error("配置文件不存在(路径:${dataFolder.absolutePath}\\config.json),无法正常使用本插件")
logger.error("配置文件不存在(路径:${file.absolutePath}),无法正常使用本插件")
return
}
val config = file.readText()
Expand Down
@@ -1 +1 @@
org.example.mirai.plugin.PluginMain
tech.eritquearcus.tuling.PluginMain

0 comments on commit d8f3f36

Please sign in to comment.