lichenaut / PlantNerfer

Customize Minecraft plant behavior.
GNU General Public License v2.0
1 stars 0 forks source link

Error loading plugin #5

Open Theorenter opened 2 weeks ago

Theorenter commented 2 weeks ago

I'm using paper-1.20.4-497 and PlantNerfer 1.5.2.

While loading the plugin I get the following error after which the plugin shuts down.

[09:41:15] [Server thread/ERROR]: Error occurred while enabling PlantNerfer v1.5.2 (Is it up to date?)
java.lang.RuntimeException: java.io.IOException: Stream closed
    at com.lichenaut.plantnerfer.PlantNerfer.reloadable(PlantNerfer.java:79) ~[PlantNerfer.jar:?]
    at com.lichenaut.plantnerfer.PlantNerfer.onEnable(PlantNerfer.java:49) ~[PlantNerfer.jar:?]
    at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:287) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]
    at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:188) ~[paper-1.20.4.jar:git-Paper-497]
    at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:104) ~[paper-1.20.4.jar:git-Paper-497]
    at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:507) ~[paper-api-1.20.4-R0.1-SNAPSHOT.jar:?]
    at org.bukkit.craftbukkit.v1_20_R3.CraftServer.enablePlugin(CraftServer.java:639) ~[paper-1.20.4.jar:git-Paper-497]
    at org.bukkit.craftbukkit.v1_20_R3.CraftServer.enablePlugins(CraftServer.java:550) ~[paper-1.20.4.jar:git-Paper-497]
    at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:671) ~[paper-1.20.4.jar:git-Paper-497]
    at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:431) ~[paper-1.20.4.jar:git-Paper-497]
    at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:309) ~[paper-1.20.4.jar:git-Paper-497]
    at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1131) ~[paper-1.20.4.jar:git-Paper-497]
    at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:319) ~[paper-1.20.4.jar:git-Paper-497]
    at java.lang.Thread.run(Thread.java:1570) ~[?:?]
Caused by: java.io.IOException: Stream closed
    at java.io.BufferedInputStream.getInIfOpen(BufferedInputStream.java:169) ~[?:?]
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:291) ~[?:?]
    at java.io.BufferedInputStream.read1(BufferedInputStream.java:347) ~[?:?]
    at java.io.BufferedInputStream.implRead(BufferedInputStream.java:420) ~[?:?]
    at java.io.BufferedInputStream.read(BufferedInputStream.java:399) ~[?:?]
    at java.io.FilterInputStream.read(FilterInputStream.java:95) ~[?:?]
    at com.lichenaut.plantnerfer.util.PNCopier.smallCopy(PNCopier.java:11) ~[PlantNerfer.jar:?]
    ... 14 more

I looked at the line that causes the error and, as it turned out, it occurs when the russian localization is copied into the plugin data flolder. Based on this, I took a copy of the russian localization from the jar plugin, threw it into the plugin data folder and the plugin launched.

Theorenter commented 2 weeks ago

And for some reason the localization automatically copied from the JAR has no lines:

[11:44:04 WARN]: [PlantNerfer] Missing message key: helpCommand in locale: en
[11:44:04 WARN]: [PlantNerfer] Missing message key: invalidCommand in locale: en
[11:44:04 WARN]: [PlantNerfer] Missing message key: reloadCommand in locale: en
[11:44:04 WARN]: [PlantNerfer] Missing message key: farmlandIntoDirt in locale: en
[11:44:04 WARN]: [PlantNerfer] Missing message key: plantDroppedNothing in locale: en
[11:44:04 WARN]: [PlantNerfer] Missing message key: cannotPlaceAnyBiome in locale: en
[11:44:04 WARN]: [PlantNerfer] Missing message key: tryOtherBiomes in locale: en
[11:44:04 WARN]: [PlantNerfer] Missing message key: plantNeedsSky in locale: en
[11:44:04 WARN]: [PlantNerfer] Missing message key: cannotPlaceFollowingBiomes in locale: en
[11:44:04 WARN]: [PlantNerfer] Missing message key: tryFollowingBiomes in locale: en
[11:44:04 WARN]: [PlantNerfer] Missing message key: cannotPlaceDark in locale: en
[11:44:04 WARN]: [PlantNerfer] Missing message key: cannotPlaceBright in locale: en
[11:44:04 WARN]: [PlantNerfer] Missing message key: cannotPlaceBelow in locale: en
[11:44:04 WARN]: [PlantNerfer] Missing message key: cannotPlaceAbove in locale: en
[11:44:04 WARN]: [PlantNerfer] Missing message key: cannotPlaceSpecific in locale: en
[11:44:04 WARN]: [PlantNerfer] Missing message key: boneMealSuccessRate in locale: en
[11:44:04 WARN]: [PlantNerfer] Missing message key: boneMealSuccessRateDark in locale: en

penikis

lichenaut commented 1 week ago

Hey, thank you for your patience. I have refactored the plugin, and have gotten the Russian localization working on my machine. Please download from https://github.com/lichenaut/PlantNerfer/releases/tag/1.5.9 and delete the PlantNerfer plugin folder to have the plugin regenerate its files.