CarmJos / UserPrefix

一个简单、高效且实时更新的用户前缀插件,基于Spigot、LuckPerms实现。
https://carmjos.github.io/UserPrefix
GNU General Public License v3.0
36 stars 10 forks source link

[Bug] Paper 启动服务器时插件报错 #8

Closed Yurinann closed 2 years ago

Yurinann commented 2 years ago

问题简述

启动服务器时插件报错

问题来源

  1. 启动服务器
  2. 报错出现

预期结果(可选)

插件正常加载

问题截图/问题报错

[18:25:09 ERROR]: Could not load 'plugins\UserPrefix-2.4.0.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: java.lang.NoClassDefFoundError: org/bstats/charts/CustomChart
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:157) ~[patched_1.16.5.jar:git-Paper-794]
        at org.bukkit.plugin.SimplePluginManager.loadPlugin(SimplePluginManager.java:414) ~[patched_1.16.5.jar:git-Paper-794]
        at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:322) ~[patched_1.16.5.jar:git-Paper-794]
        at org.bukkit.craftbukkit.v1_16_R3.CraftServer.loadPlugins(CraftServer.java:393) ~[patched_1.16.5.jar:git-Paper-794]
        at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:269) ~[patched_1.16.5.jar:git-Paper-794]
        at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1074) ~[patched_1.16.5.jar:git-Paper-794]
        at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:291) ~[patched_1.16.5.jar:git-Paper-794]
        at java.lang.Thread.run(Thread.java:831) [?:?]
Caused by: java.lang.NoClassDefFoundError: org/bstats/charts/CustomChart
        at java.lang.Class.forName0(Native Method) ~[?:?]
        at java.lang.Class.forName(Class.java:466) ~[?:?]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:82) ~[patched_1.16.5.jar:git-Paper-794]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:153) ~[patched_1.16.5.jar:git-Paper-794]
        ... 7 more
Caused by: java.lang.ClassNotFoundException: org.bstats.charts.CustomChart
        at org.bukkit.plugin.java.PluginClassLoader.loadClass0(PluginClassLoader.java:155) ~[patched_1.16.5.jar:git-Paper-794]
        at org.bukkit.plugin.java.PluginClassLoader.loadClass(PluginClassLoader.java:114) ~[patched_1.16.5.jar:git-Paper-794]
        at java.lang.ClassLoader.loadClass(ClassLoader.java:519) ~[?:?]
        at java.lang.Class.forName0(Native Method) ~[?:?]
        at java.lang.Class.forName(Class.java:466) ~[?:?]
        at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:82) ~[patched_1.16.5.jar:git-Paper-794]
        at org.bukkit.plugin.java.JavaPluginLoader.loadPlugin(JavaPluginLoader.java:153) ~[patched_1.16.5.jar:git-Paper-794]
        ... 7 more

操作环境

[18:26:49 INFO]: Checking version, please wait...
[18:26:50 INFO]: [BentoBox] Successfully downloaded data from GitHub.
[18:26:50 INFO]: This server is running Paper version git-Paper-794 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)

1.18.1 Pufferfish (Paper fork) 相同

其他补充

暂无

CarmJos commented 2 years ago

正在排查问题。

CarmJos commented 2 years ago

不会吧... 我用不用的反编译软件检查了类的导用都是正常的地址呀?

调用过程

主类上的调用

image

调用导入地址

image

相关包内类

image

CarmJos commented 2 years ago

您好,我不能复现您出现的问题:

环境为 Purpur git-Purpur-1171 (MC: 1.16.5) (Implementing API version 1.16.5-R0.1-SNAPSHOT)

image

Ghost-chu commented 2 years ago
image

问题无法复现,请上传你下载的JAR

Yurinann commented 2 years ago

https://cowtransfer.com/s/f58c9eeae09049

Paper 1.16.5

另外,我使用的 Java 环境是 Azul Zulu 16 (1.18.1 时为 17)

CarmJos commented 2 years ago

ummm...

我觉得他的意思是上传插件的jar。

Yurinann commented 2 years ago

https://cowtransfer.com/s/1cbe691d14ee4b

来源于 Github Actions

CarmJos commented 2 years ago

请换用 releases 中提供的JAR。

CarmJos commented 2 years ago

Github Actions 相关构建已被标注 “Build & Tests” 即构建仅用于测试,并不能用于生产环境。

CarmJos commented 2 years ago

为避免类似情况的发生,自 81e0c09 开始,测试流水线将同时提供“测试产物”与“最终产物”,如 runs@1858955419

CarmJos commented 2 years ago

同时强烈建议使用 releases 下的插件版本。

CarmJos commented 2 years ago

如问题已解决,请关闭本 issues 。感谢您对社区的贡献。

Yurinann commented 2 years ago

问题已解决,感谢您的及时帮助。