问题描述
使用TabooLib 2.0.38版本执行原生语句 tell,sound 等出现报错 切换到2.0.37后可以正常执行kether语句
Gradle配置
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
import io.izzel.taboolib.gradle.*
import org.jetbrains.kotlin.gradle.dsl.JvmTarget.JVM_1_8
import io.izzel.taboolib.gradle.Basic
import io.izzel.taboolib.gradle.BukkitUI
import io.izzel.taboolib.gradle.BukkitHook
import io.izzel.taboolib.gradle.Bukkit
plugins {
java
id("io.izzel.taboolib") version "2.0.38"
id("org.jetbrains.kotlin.jvm") version "2.2.0"
}
taboolib {
env {
install(Basic)
install(BukkitUI)
install(BukkitHook)
install(Bukkit)
install(Kether)
install(CommandHelper)
}
description {
name = "CloudProfile"
desc("查看玩家个人档案")
contributors {
name("BalanceSea")
}
dependencies {
name("PlaceholderAPI").optional(true)
}
}
version { taboolib = "6.3.0-75b18a2" }
}
repositories {
mavenCentral()
}
dependencies {
compileOnly("ink.ptms.core:v12004:12004:mapped")
compileOnly("ink.ptms.core:v12004:12004:universal")
compileOnly(kotlin("stdlib"))
compileOnly(fileTree("libs"))
}
tasks.withType<JavaCompile> {
options.encoding = "UTF-8"
}
tasks.withType<KotlinCompile> {
compilerOptions {
jvmTarget.set(JVM_1_8)
freeCompilerArgs.add("-Xjvm-default=all")
}
}
java {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
复现代码
/**
* 执行Kether脚本
*/
fun execute(player: Player,ketherList: List<String>){
//info("执行 $ketherList")
KetherShell.eval(
//source = ketherList,
source = "tell 'Kether Test'",
options = ScriptOptions.new {
sender(player)
}
).join()
}
报错日志
[04:31:15 WARN]: com.cloudworld.cloudprofile.taboolib.library.kether.LocalizedException: Isolate literal "tell" is not end of block, maybe a misspelled action?
[04:31:15 WARN]: at CloudProfile-1.0.0-SNAPSHOT.jar//com.cloudworld.cloudprofile.taboolib.library.kether.LocalizedException.of(LocalizedException.java:55)
[04:31:15 WARN]: at CloudProfile-1.0.0-SNAPSHOT.jar//com.cloudworld.cloudprofile.taboolib.module.kether.KetherError.create(KetherError.kt:11)
[04:31:15 WARN]: at CloudProfile-1.0.0-SNAPSHOT.jar//com.cloudworld.cloudprofile.taboolib.library.kether.BlockReader.checkLiteral(BlockReader.java:58)
[04:31:15 WARN]: at CloudProfile-1.0.0-SNAPSHOT.jar//com.cloudworld.cloudprofile.taboolib.library.kether.BlockReader.readBlock(BlockReader.java:47)
[04:31:15 WARN]: at CloudProfile-1.0.0-SNAPSHOT.jar//com.cloudworld.cloudprofile.taboolib.library.kether.BlockReader.parse(BlockReader.java:36)
[04:31:15 WARN]: at CloudProfile-1.0.0-SNAPSHOT.jar//com.cloudworld.cloudprofile.taboolib.library.kether.SimpleQuestLoader.load(SimpleQuestLoader.java:18)
[04:31:15 WARN]: at CloudProfile-1.0.0-SNAPSHOT.jar//com.cloudworld.cloudprofile.taboolib.module.kether.KetherHelperKt.parseKetherScript(KetherHelper.kt:45)
[04:31:15 WARN]: at CloudProfile-1.0.0-SNAPSHOT.jar//com.cloudworld.cloudprofile.taboolib.module.kether.KetherShell$eval$script$1.invoke(KetherShell.kt:55)
[04:31:15 WARN]: at CloudProfile-1.0.0-SNAPSHOT.jar//com.cloudworld.cloudprofile.taboolib.module.kether.KetherShell$eval$script$1.invoke(KetherShell.kt:54)
[04:31:15 WARN]: at CloudProfile-1.0.0-SNAPSHOT.jar//com.cloudworld.cloudprofile.taboolib.module.kether.KetherShell.eval$lambda$0(KetherShell.kt:54)
[04:31:15 WARN]: at java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1724)
[04:31:15 WARN]: at CloudProfile-1.0.0-SNAPSHOT.jar//com.cloudworld.cloudprofile.taboolib.module.kether.KetherShell.eval(KetherShell.kt:54)
[04:31:15 WARN]: at CloudProfile-1.0.0-SNAPSHOT.jar//com.cloudworld.cloudprofile.taboolib.module.kether.KetherShell.eval$process(KetherShell.kt:16)
[04:31:15 WARN]: at CloudProfile-1.0.0-SNAPSHOT.jar//com.cloudworld.cloudprofile.taboolib.module.kether.KetherShell.eval(KetherShell.kt:17)
[04:31:15 WARN]: at CloudProfile-1.0.0-SNAPSHOT.jar//com.cloudworld.cloudprofile.utils.ProfileKetherExecuter.execute(ProfileKetherExecuter.kt:16)
[04:31:15 WARN]: at CloudProfile-1.0.0-SNAPSHOT.jar//com.cloudworld.cloudprofile.gui.ProfileGUI.openProfileMenu$lambda$3$lambda$2(ProfileGUI.kt:50)
[04:31:15 WARN]: at CloudProfile-1.0.0-SNAPSHOT.jar//com.cloudworld.cloudprofile.taboolib.module.ui.type.impl.ChestImpl$onClick$2.invoke(ChestImpl.kt:192)
[04:31:15 WARN]: at CloudProfile-1.0.0-SNAPSHOT.jar//com.cloudworld.cloudprofile.taboolib.module.ui.type.impl.ChestImpl$onClick$2.invoke(ChestImpl.kt:187)
[04:31:15 WARN]: at CloudProfile-1.0.0-SNAPSHOT.jar//com.cloudworld.cloudprofile.taboolib.module.ui.ClickListener.onClick(ClickListener.kt:73)
[04:31:15 WARN]: at CloudProfile-1.0.0-SNAPSHOT.jar//com.cloudworld.cloudprofile.taboolib.library.reflex.JavaClassMethod.invoke(JavaClassMethod.kt:61)
[04:31:15 WARN]: at CloudProfile-1.0.0-SNAPSHOT.jar//com.cloudworld.cloudprofile.taboolib.common.platform.event.EventBus.invoke(EventBus.kt:161)
[04:31:15 WARN]: at CloudProfile-1.0.0-SNAPSHOT.jar//com.cloudworld.cloudprofile.taboolib.common.platform.event.EventBus.invoke$default(EventBus.kt:159)
[04:31:15 WARN]: at CloudProfile-1.0.0-SNAPSHOT.jar//com.cloudworld.cloudprofile.taboolib.common.platform.event.EventBus$registerBukkit$2.invoke(EventBus.kt:88)
[04:31:15 WARN]: at CloudProfile-1.0.0-SNAPSHOT.jar//com.cloudworld.cloudprofile.taboolib.common.platform.event.EventBus$registerBukkit$2.invoke(EventBus.kt:88)
[04:31:15 WARN]: at CloudProfile-1.0.0-SNAPSHOT.jar//com.cloudworld.cloudprofile.taboolib.common.platform.function.ListenerKt$registerBukkitListener$1.invoke(Listener.kt:37)
[04:31:15 WARN]: at CloudProfile-1.0.0-SNAPSHOT.jar//com.cloudworld.cloudprofile.taboolib.common.platform.function.ListenerKt$registerBukkitListener$1.invoke(Listener.kt:37)
[04:31:15 WARN]: at CloudProfile-1.0.0-SNAPSHOT.jar//com.cloudworld.cloudprofile.taboolib.platform.BukkitListener$registerListener$listener$1.invoke(BukkitListener.kt:36)
[04:31:15 WARN]: at CloudProfile-1.0.0-SNAPSHOT.jar//com.cloudworld.cloudprofile.taboolib.platform.BukkitListener$registerListener$listener$1.invoke(BukkitListener.kt:36)
[04:31:15 WARN]: at CloudProfile-1.0.0-SNAPSHOT.jar//com.cloudworld.cloudprofile.taboolib.platform.BukkitListener$BukkitListener.execute(BukkitListener.kt:57)
[04:31:15 WARN]: at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:71)
[04:31:15 WARN]: at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:60)
[04:31:15 WARN]: at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131)
[04:31:15 WARN]: at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:629)
[04:31:15 WARN]: at net.minecraft.server.network.ServerGamePacketListenerImpl.handleContainerClick(ServerGamePacketListenerImpl.java:3430)
[04:31:15 WARN]: at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:59)
[04:31:15 WARN]: at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:14)
[04:31:15 WARN]: at net.minecraft.network.PacketProcessor$ListenerAndPacket.handle(PacketProcessor.java:99)
[04:31:15 WARN]: at net.minecraft.network.PacketProcessor.executeSinglePacket(PacketProcessor.java:33)
[04:31:15 WARN]: at net.minecraft.server.MinecraftServer.runAllTasksAtTickStart(MinecraftServer.java:1252)
[04:31:15 WARN]: at net.minecraft.server.MinecraftServer.processPacketsAndTick(MinecraftServer.java:1769)
[04:31:15 WARN]: at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1435)
[04:31:15 WARN]: at net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:430)
[04:31:15 WARN]: at java.base/java.lang.Thread.run(Thread.java:1474)
问题描述
使用TabooLib 2.0.38版本执行原生语句 tell,sound 等出现报错 切换到2.0.37后可以正常执行kether语句
Gradle配置
复现代码
报错日志
https://mclo.gs/GFXIbSv