TabooLib / taboolib

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

无法使用 env.properties 配置 #362

Closed TheFloodDragon closed 1 year ago

TheFloodDragon commented 1 year ago

之前就存在的问题:#308 #318

《为什么还不修》

文件内容如下:

library=libraries

报错如下:

[23:07:55] [Server thread/INFO]: [Adyeshach-2.0.0-snapshot-30.jar] RuntimeEnv setup...
[23:07:55] [Server thread/ERROR]: [ModernPluginLoadingStrategy] Could not load plugin 'Adyeshach-2.0.0-snapshot-30.jar' in folder 'plugins'
org.bukkit.plugin.InvalidPluginException: java.lang.ExceptionInInitializerError
    at io.papermc.paper.plugin.provider.type.spigot.SpigotPluginProvider.createInstance(SpigotPluginProvider.java:127) ~[paper-1.20.1.jar:git-Paper-83]
    at io.papermc.paper.plugin.provider.type.spigot.SpigotPluginProvider.createInstance(SpigotPluginProvider.java:35) ~[paper-1.20.1.jar:git-Paper-83]
    at io.papermc.paper.plugin.entrypoint.strategy.modern.ModernPluginLoadingStrategy.loadProviders(ModernPluginLoadingStrategy.java:116) ~[paper-1.20.1.jar:git-Paper-83]
    at io.papermc.paper.plugin.storage.SimpleProviderStorage.enter(SimpleProviderStorage.java:39) ~[paper-1.20.1.jar:git-Paper-83]
    at io.papermc.paper.plugin.entrypoint.LaunchEntryPointHandler.enter(LaunchEntryPointHandler.java:36) ~[paper-1.20.1.jar:git-Paper-83]
    at org.bukkit.craftbukkit.v1_20_R1.CraftServer.loadPlugins(CraftServer.java:507) ~[paper-1.20.1.jar:git-Paper-83]
    at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:273) ~[paper-1.20.1.jar:git-Paper-83]
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1101) ~[paper-1.20.1.jar:git-Paper-83]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:318) ~[paper-1.20.1.jar:git-Paper-83]
    at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.ExceptionInInitializerError
    at ink.ptms.adyeshach.taboolib.common.TabooLibCommon.lifeCycle(TabooLibCommon.java:169) ~[Adyeshach-2.0.0-snapshot-30.jar:?]
    at ink.ptms.adyeshach.taboolib.platform.BukkitPlugin.<clinit>(BukkitPlugin.java:56) ~[Adyeshach-2.0.0-snapshot-30.jar:?]
    at java.lang.Class.forName0(Native Method) ~[?:?]
    at java.lang.Class.forName(Class.java:467) ~[?:?]
    at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:76) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
    at io.papermc.paper.plugin.provider.type.spigot.SpigotPluginProvider.createInstance(SpigotPluginProvider.java:123) ~[paper-1.20.1.jar:git-Paper-83]
    ... 9 more
Caused by: java.lang.NullPointerException: Cannot invoke "java.util.Properties.load(java.io.InputStream)" because "ink.ptms.adyeshach.taboolib.common.env.RuntimeEnv.ENV_PROPERTIES" is null
    at ink.ptms.adyeshach.taboolib.common.env.RuntimeEnv.<init>(RuntimeEnv.java:41) ~[Adyeshach-2.0.0-snapshot-30.jar:?]
    at ink.ptms.adyeshach.taboolib.common.env.RuntimeEnv.<clinit>(RuntimeEnv.java:24) ~[Adyeshach-2.0.0-snapshot-30.jar:?]
    at ink.ptms.adyeshach.taboolib.common.TabooLibCommon.lifeCycle(TabooLibCommon.java:169) ~[Adyeshach-2.0.0-snapshot-30.jar:?]
    at ink.ptms.adyeshach.taboolib.platform.BukkitPlugin.<clinit>(BukkitPlugin.java:56) ~[Adyeshach-2.0.0-snapshot-30.jar:?]
    at java.lang.Class.forName0(Native Method) ~[?:?]
    at java.lang.Class.forName(Class.java:467) ~[?:?]
    at org.bukkit.plugin.java.PluginClassLoader.<init>(PluginClassLoader.java:76) ~[paper-api-1.20.1-R0.1-SNAPSHOT.jar:?]
    at io.papermc.paper.plugin.provider.type.spigot.SpigotPluginProvider.createInstance(SpigotPluginProvider.java:123) ~[paper-1.20.1.jar:git-Paper-83]
    ... 9 more
Polar-Pumpkin commented 1 year ago

已在 https://github.com/TabooLib/taboolib/pull/364 中尝试修复🥰,不过需要插件使用最新版的 TabooLib 编译🥲

TheFloodDragon commented 1 year ago

已在 #364 中尝试修复🥰,不过需要插件使用最新版的 TabooLib 编译🥲

“好消息”:测试后发现 repository-central 无法使用

Polar-Pumpkin commented 1 year ago

https://github.com/TabooLib/taboolib/pull/368