Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashes on Folia startup #70

Open
VRILGQD opened this issue Dec 18, 2024 · 5 comments
Open

Crashes on Folia startup #70

VRILGQD opened this issue Dec 18, 2024 · 5 comments

Comments

@VRILGQD
Copy link

VRILGQD commented Dec 18, 2024

I get this error when it starts up. This happens with both MySQL and flatfile when using Folia.
[23:00:48] [Server thread/ERROR]: Error occurred while enabling BreweryX v3.4.5-SNAPSHOT;snapshot (Is it up to date?) java.lang.NullPointerException: Cannot read field "captureTreeGeneration" because the return value of "net.minecraft.world.level.Level.getCurrentWorldData()" is null at net.minecraft.world.level.Level.getBlockState(Level.java:1386) ~[folia-1.21.4.jar:1.21.4-DEV-1c0ecd3] at org.bukkit.craftbukkit.block.CraftBlock.getType(CraftBlock.java:244) ~[folia-1.21.4.jar:1.21.4-DEV-1c0ecd3] at org.bukkit.craftbukkit.block.CraftBlock.toString(CraftBlock.java:300) ~[folia-1.21.4.jar:1.21.4-DEV-1c0ecd3] at java.base/java.util.Formatter$FormatSpecifier.printString(Formatter.java:3158) ~[?:?] at java.base/java.util.Formatter$FormatSpecifier.print(Formatter.java:3036) ~[?:?] at java.base/java.util.Formatter.format(Formatter.java:2791) ~[?:?] at java.base/java.util.Formatter.format(Formatter.java:2728) ~[?:?] at java.base/java.lang.String.format(String.java:4390) ~[?:?] at java.base/java.util.stream.Collectors.duplicateKeyException(Collectors.java:135) ~[?:?] at java.base/java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Collectors.java:182) ~[?:?] at java.base/java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169) ~[?:?] at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) ~[?:?] at java.base/java.util.AbstractList$RandomAccessSpliterator.forEachRemaining(AbstractList.java:722) ~[?:?] at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?] at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?] at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) ~[?:?] at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?] at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) ~[?:?] at BreweryX-3.4.5-SNAPSHOT.jar/com.dre.brewery.BreweryPlugin.onEnable(BreweryPlugin.java:152) ~[BreweryX-3.4.5-SNAPSHOT.jar:?] at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:288) ~[folia-api-1.21.4-R0.1-SNAPSHOT.jar:?] at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:202) ~[folia-1.21.4.jar:1.21.4-DEV-1c0ecd3] at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:109) ~[folia-1.21.4.jar:1.21.4-DEV-1c0ecd3] at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:520) ~[folia-api-1.21.4-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.CraftServer.enablePlugin(CraftServer.java:655) ~[folia-1.21.4.jar:1.21.4-DEV-1c0ecd3] at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:604) ~[folia-1.21.4.jar:1.21.4-DEV-1c0ecd3] at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:811) ~[folia-1.21.4.jar:1.21.4-DEV-1c0ecd3] at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:558) ~[folia-1.21.4.jar:1.21.4-DEV-1c0ecd3] at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:326) ~[folia-1.21.4.jar:1.21.4-DEV-1c0ecd3] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1318) ~[folia-1.21.4.jar:1.21.4-DEV-1c0ecd3] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:384) ~[folia-1.21.4.jar:1.21.4-DEV-1c0ecd3] at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]

@VRILGQD
Copy link
Author

VRILGQD commented Dec 18, 2024

It seems I found a fix right in this thread, thought it does not seem to be in the main plugin. A bug like this should be patched immediately.
BreweryX/issues/41

Jsinco added a commit that referenced this issue Dec 18, 2024
@2534905003
Copy link

I'm running into this issue as well

@Vutka1
Copy link
Contributor

Vutka1 commented Dec 22, 2024

Should be fixed in version 3.4.5

@2534905003
Copy link

应在版本 3.4.5 中修复

[19:38:18] [Server thread/INFO]: [BreweryX] Enabling BreweryX v3.4.5;master
[19:38:18] [Server thread/INFO]: [BreweryX] Using language: zh.yml
[19:38:19] [Server thread/INFO]: [BreweryX] Minecraft version: 1.21
[19:38:19] [Server thread/INFO]: [BreweryX] DataManager created: FlatFile
[19:38:19] [Server thread/ERROR]: Error occurred while enabling BreweryX v3.4.5;master (Is it up to date?)
java.lang.NullPointerException: Cannot read field "captureTreeGeneration" because the return value of "net.minecraft.world.level.Level.getCurrentWorldData()" is null
at net.minecraft.world.level.Level.getBlockState(Level.java:1311) ~[luminol-1.21.1.jar:1.21.1-DEV-791d374]
at org.bukkit.craftbukkit.block.CraftBlock.getType(CraftBlock.java:244) ~[luminol-1.21.1.jar:1.21.1-DEV-791d374]
at [B][酿酒]BreweryX-3.4.5.jar/com.dre.brewery.BarrelBody.getBrokenBlock(BarrelBody.java:234) ~[[B][酿酒]BreweryX-3.4.5.jar:?]
at [B][酿酒]BreweryX-3.4.5.jar/com.dre.brewery.Barrel.regenerateBounds(Barrel.java:455) ~[[B][酿酒]BreweryX-3.4.5.jar:?]
at [B][酿酒]BreweryX-3.4.5.jar/com.dre.brewery.BarrelBody.(BarrelBody.java:76) ~[[B][酿酒]BreweryX-3.4.5.jar:?]
at [B][酿酒]BreweryX-3.4.5.jar/com.dre.brewery.Barrel.(Barrel.java:111) ~[[B][酿酒]BreweryX-3.4.5.jar:?]
at [B][酿酒]BreweryX-3.4.5.jar/com.dre.brewery.storage.impls.FlatFileStorage.getBarrel(FlatFileStorage.java:193) ~[[B][酿酒]BreweryX-3.4.5.jar:?]
at [B][酿酒]BreweryX-3.4.5.jar/com.dre.brewery.storage.impls.FlatFileStorage.getAllBarrels(FlatFileStorage.java:206) ~[[B][酿酒]BreweryX-3.4.5.jar:?]
at [B][酿酒]BreweryX-3.4.5.jar/com.dre.brewery.BreweryPlugin.onEnable(BreweryPlugin.java:152) ~[[B][酿酒]BreweryX-3.4.5.jar:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:288) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperPluginInstanceManager.enablePlugin(PaperPluginInstanceManager.java:202) ~[luminol-1.21.1.jar:1.21.1-DEV-791d374]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.enablePlugin(PaperPluginManagerImpl.java:109) ~[luminol-1.21.1.jar:1.21.1-DEV-791d374]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:520) ~[paper-mojangapi-1.21.1-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.CraftServer.enablePlugin(CraftServer.java:646) ~[luminol-1.21.1.jar:1.21.1-DEV-791d374]
at org.bukkit.craftbukkit.CraftServer.enablePlugins(CraftServer.java:595) ~[luminol-1.21.1.jar:1.21.1-DEV-791d374]
at net.minecraft.server.MinecraftServer.loadWorld0(MinecraftServer.java:780) ~[luminol-1.21.1.jar:1.21.1-DEV-791d374]
at net.minecraft.server.MinecraftServer.loadLevel(MinecraftServer.java:527) ~[luminol-1.21.1.jar:1.21.1-DEV-791d374]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:331) ~[luminol-1.21.1.jar:1.21.1-DEV-791d374]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1281) ~[luminol-1.21.1.jar:1.21.1-DEV-791d374]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:357) ~[luminol-1.21.1.jar:1.21.1-DEV-791d374]
at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]
[19:38:19] [Server thread/INFO]: [BreweryX] Disabling BreweryX v3.4.5;master
[19:38:19] [Server thread/INFO]: [BreweryX] Closed connection from: FlatFile
[19:38:19] [Server thread/INFO]: [BreweryX] BreweryX disabled!

@2534905003
Copy link

3.4.5 中修复

I have used the latest version 3.4.5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants