TabooLib / taboolib

Powerful framework for creating multi-platform Minecraft plugin
https://tabooproject.org
MIT License
313 stars 100 forks source link

添加UI后的插件无法在1.21.1运行 #482

Closed alazeprt closed 1 month ago

alazeprt commented 1 month ago

如题, 服务端基本信息:

[15:53:46 INFO]: This server is running Leaf version 1.21.1-DEV-ver/1.21.1@ad44992 (2024-10-22T06:43:50Z) (Implementing API version 1.21.1-R0.1-SNAPSHOT)
* You are running the latest version
Previous: 1.21.1-DEV-4548da8 (MC: 1.21.1)

build.gradle.kts:

import io.izzel.taboolib.gradle.*
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile

plugins {
    java
    id("io.izzel.taboolib") version "2.0.13"
    id("org.jetbrains.kotlin.jvm") version "1.8.22"
}

taboolib {
    env {
        // 安装模块
        install(UNIVERSAL, BUKKIT, UI)
    }
    version { taboolib = "6.1.2-beta10" }
    description {
        name("LPRank")
        desc("A plugin based on the LuckPerms implementation of the ranking system")
        dependencies {
            name("LuckPerms")
            name("PlaceholderAPI").optional(true)
        }
        contributors {
            name("alazeprt")
        }
    }
}

repositories {
    mavenCentral()
    maven("https://repo.extendedclip.com/content/repositories/placeholderapi/")
}

dependencies {
    compileOnly("ink.ptms.core:v12101:12101:mapped")
    compileOnly("ink.ptms.core:v12101:12101:universal")
    compileOnly("net.luckperms:api:5.4")
    compileOnly("me.clip:placeholderapi:2.11.6")
    compileOnly(kotlin("stdlib"))
    compileOnly(fileTree("libs"))
}

tasks.withType<JavaCompile> {
    options.encoding = "UTF-8"
}

tasks.withType<KotlinCompile> {
    kotlinOptions {
        jvmTarget = "1.8"
        freeCompilerArgs = listOf("-Xjvm-default=all")
    }
}

configure<JavaPluginConvention> {
    sourceCompatibility = JavaVersion.VERSION_1_8
    targetCompatibility = JavaVersion.VERSION_1_8
}

运行的报错信息:

[15:53:41 WARN]: top.alazeprt.lprank.taboolib.common.inject.ClassVisitException: class top.alazeprt.lprank.taboolib.module.nms.MinecraftVersion#init: VisitorGroup{priority=0, list=[AwakeFunction(lifeCycle=NONE), AwakeFunction(lifeCycle=CONST), AwakeFunction(lifeCycle=INIT), AwakeFunction(lifeCycle=LOAD), AwakeFunction(lifeCycle=ENABLE), AwakeFunction(lifeCycle=ACTIVE), AwakeFunction(lifeCycle=DISABLE), top.alazeprt.lprank.taboolib.common.platform.command.SimpleCommandRegister@16cef7c]} (LOAD)
[15:53:41 WARN]:        at LPRank-1.0.1.jar//top.alazeprt.lprank.taboolib.common.inject.VisitorHandler.visitMethod(VisitorHandler.java:146)
[15:53:41 WARN]:        at LPRank-1.0.1.jar//top.alazeprt.lprank.taboolib.common.inject.VisitorHandler.inject(VisitorHandler.java:114)
[15:53:41 WARN]:        at LPRank-1.0.1.jar//top.alazeprt.lprank.taboolib.common.inject.VisitorHandler.injectAll(VisitorHandler.java:77)
[15:53:41 WARN]:        at LPRank-1.0.1.jar//top.alazeprt.lprank.taboolib.common.inject.VisitorHandler.lambda$init$0(VisitorHandler.java:44)
[15:53:41 WARN]:        at LPRank-1.0.1.jar//top.alazeprt.lprank.taboolib.common.TabooLib$1.run(TabooLib.java:79)
[15:53:41 WARN]:        at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
[15:53:41 WARN]:        at LPRank-1.0.1.jar//top.alazeprt.lprank.taboolib.common.TabooLib.lambda$lifeCycle$0(TabooLib.java:56)
[15:53:41 WARN]:        at java.base/java.util.Optional.ifPresent(Optional.java:178)
[15:53:41 WARN]:        at LPRank-1.0.1.jar//top.alazeprt.lprank.taboolib.common.TabooLib.lifeCycle(TabooLib.java:56)
[15:53:41 WARN]:        at LPRank-1.0.1.jar//top.alazeprt.lprank.taboolib.platform.BukkitPlugin.onLoad(BukkitPlugin.java:73)
[15:53:41 WARN]:        at io.papermc.paper.plugin.storage.ServerPluginProviderStorage.processProvided(ServerPluginProviderStorage.java:59)
[15:53:41 WARN]:        at io.papermc.paper.plugin.storage.ServerPluginProviderStorage.processProvided(ServerPluginProviderStorage.java:18)
[15:53:41 WARN]:        at io.papermc.paper.plugin.storage.SimpleProviderStorage.enter(SimpleProviderStorage.java:39)
[15:53:41 WARN]:        at io.papermc.paper.plugin.entrypoint.LaunchEntryPointHandler.enter(LaunchEntryPointHandler.java:40)
[15:53:41 WARN]:        at org.bukkit.craftbukkit.CraftServer.loadPlugins(CraftServer.java:566)
[15:53:41 WARN]:        at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:341)
[15:53:41 WARN]:        at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1217)
[15:53:41 WARN]:        at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320)
[15:53:41 WARN]:        at java.base/java.lang.Thread.run(Thread.java:1583)
[15:53:41 WARN]: Caused by: java.lang.IllegalStateException: Unsupported Minecraft version, plugin disabled
[15:53:41 WARN]:        at LPRank-1.0.1.jar//top.alazeprt.lprank.taboolib.module.nms.MinecraftVersion.init(MinecraftVersion.kt:211)
[15:53:41 WARN]:        at java.base/java.lang.invoke.MethodHandle.invokeWithArguments(MethodHandle.java:733)
[15:53:41 WARN]:        at LPRank-1.0.1.jar//top.alazeprt.lprank.taboolib.library.reflex.JavaClassMethod.invoke(JavaClassMethod.kt:31)
[15:53:41 WARN]:        at LPRank-1.0.1.jar//top.alazeprt.lprank.taboolib.common.platform.AwakeFunction.visit(AwakeFunction.kt:13)
[15:53:41 WARN]:        at LPRank-1.0.1.jar//top.alazeprt.lprank.taboolib.common.inject.VisitorHandler.visitMethod(VisitorHandler.java:144)
[15:53:41 WARN]:        ... 18 more
alazeprt commented 1 month ago

在升级为6.2.0-beta21版本后已解决