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

NPE: Could not pass event InventoryClickEvent to BentoBox v2.0.0-SNAPSHOT-b2514 #298

Closed
IAISI opened this issue Jan 1, 2024 · 3 comments · Fixed by BentoBoxWorld/BentoBox#2253
Assignees
Labels
bug done this has been completed

Comments

@IAISI
Copy link

IAISI commented Jan 1, 2024

Expected behavior

Not sure

Observed/Actual behavior

com.destroystokyo.paper.exception.ServerEventException: Could not pass event InventoryClickEvent to BentoBox v2.0.0-SNAPSHOT-b2514
	at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:72)
	at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126)
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:615)
	at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:3117)
	at net.minecraft.network.protocol.game.PacketPlayInWindowClick.a(PacketPlayInWindowClick.java:58)
	at net.minecraft.network.protocol.game.PacketPlayInWindowClick.a(PacketPlayInWindowClick.java:23)
	at net.minecraft.network.protocol.PlayerConnectionUtils.lambda$ensureRunningOnSameThread$0(PlayerConnectionUtils.java:54)
	at net.minecraft.server.TickTask.run(TickTask.java:18)
	at net.minecraft.util.thread.IAsyncTaskHandler.d(IAsyncTaskHandler.java:153)
	at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.d(IAsyncTaskHandlerReentrant.java:24)
	at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1458)
	at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:194)
	at net.minecraft.util.thread.IAsyncTaskHandler.x(IAsyncTaskHandler.java:126)
	at net.minecraft.server.MinecraftServer.bl(MinecraftServer.java:1435)
	at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1358)
	at net.minecraft.util.thread.IAsyncTaskHandler.c(IAsyncTaskHandler.java:136)
	at net.minecraft.server.MinecraftServer.w_(MinecraftServer.java:1336)
	at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1220)
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:321)
	at java.base/java.lang.Thread.run(Thread.java:840)
Caused by: java.lang.NullPointerException: Cannot invoke "Object.getClass()" because "key" is null
	at java.base/java.util.EnumMap.typeCheck(EnumMap.java:736)
	at java.base/java.util.EnumMap.put(EnumMap.java:264)
	at java.base/java.util.EnumMap.put(EnumMap.java:78)
	at java.base/java.util.AbstractMap.putAll(AbstractMap.java:281)
	at java.base/java.util.EnumMap.putAll(EnumMap.java:347)
	at Level-2.12.0-SNAPSHOT-b553.jar//world.bentobox.level.panels.DetailsPanel.updateFilters(DetailsPanel.java:117)
	at Level-2.12.0-SNAPSHOT-b553.jar//world.bentobox.level.panels.DetailsPanel.<init>(DetailsPanel.java:66)
	at Level-2.12.0-SNAPSHOT-b553.jar//world.bentobox.level.panels.DetailsPanel.openPanel(DetailsPanel.java:592)
	at Level-2.12.0-SNAPSHOT-b553.jar//world.bentobox.level.panels.TopLevelPanel.lambda$createIslandIcon$2(TopLevelPanel.java:223)
	at BentoBox.jar//world.bentobox.bentobox.listeners.PanelListenerManager.lambda$onInventoryClick$0(PanelListenerManager.java:56)
	at java.base/java.util.Optional.ifPresent(Optional.java:178)
	at BentoBox.jar//world.bentobox.bentobox.listeners.PanelListenerManager.onInventoryClick(PanelListenerManager.java:54)
	at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor964.execute(Unknown Source)
	at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77)
	at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:77)
	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70)
	at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54)
	at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126)
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:615)
	at net.minecraft.server.network.ServerGamePacketListenerImpl.handleContainerClick(ServerGamePacketListenerImpl.java:3117)
	at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:58)
	at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:23)
	at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:54)
	at net.minecraft.server.TickTask.run(TickTask.java:18)
	at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:153)
	at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24)
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1458)
	at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:194)
	at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126)
	at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1435)
	at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1358)
	at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136)
	at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1336)
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1220)
	... 2 more

Steps/models to reproduce

Unable to reproduce yet.

BentoBox version

bentobox version
[19:39:06 INFO]: Running PAPER 1.20.4.
[19:39:06 INFO]: BentoBox version: 2.0.0-SNAPSHOT-b2514
[19:39:06 INFO]: Database: JSON
[19:39:06 INFO]: Loaded Game Worlds:
[19:39:06 INFO]: bskyblock_world (BSkyBlock): Overworld, Nether, The End
[19:39:06 INFO]: Loaded Addons:
[19:39:06 INFO]: Bank 1.7.1-SNAPSHOT-b87 (ENABLED)
[19:39:06 INFO]: Biomes 2.2.0-SNAPSHOT-b255 (ENABLED)
[19:39:06 INFO]: Border 4.1.1-SNAPSHOT-b187 (ENABLED)
[19:39:06 INFO]: BSkyBlock 1.17.0-SNAPSHOT-b751 (ENABLED)
[19:39:06 INFO]: CauldronWitchery 2.1.0-SNAPSHOT-#58 (ENABLED)
[19:39:06 INFO]: Challenges 1.3.0-SNAPSHOT-b538 (ENABLED)
[19:39:06 INFO]: CheckMeOut 1.2.0-SNAPSHOT-b92 (ENABLED)
[19:39:06 INFO]: ControlPanel 1.13.1-SNAPSHOT-b61 (ENABLED)
[19:39:06 INFO]: DimensionalTrees 1.6.1-SNAPSHOT-b89 (ENABLED)
[19:39:06 INFO]: ExtraMobs 1.12 (ENABLED)
[19:39:06 INFO]: IslandFly 1.11.1 (ENABLED)
[19:39:06 INFO]: Level 2.12.0-SNAPSHOT-b553 (ENABLED)
[19:39:06 INFO]: Likes 2.4.0-SNAPSHOT-b99 (ENABLED)
[19:39:06 INFO]: MagicCobblestoneGenerator 2.6.0-SNAPSHOT-b270 (ENABLED)
[19:39:06 INFO]: TwerkingForTrees 1.4.4-SNAPSHOT-b68 (ENABLED)
[19:39:06 INFO]: Visit 1.7.0-SNAPSHOT (ENABLED)
[19:39:06 INFO]: Warps 1.14.0-SNAPSHOT-b358 (ENABLED)

Plugin list

No response

Other

No response

@IAISI
Copy link
Author

IAISI commented Jan 1, 2024

Not quite sure if this is BentoBox or Levels issue TBH.

@tastybento
Copy link
Member

This was caused by the Material Enum of GRASS becoming SHORT_GRASS. As the old enum was stored in the database and loaded in, it wasn't identified and became null. Rerunning the level command cleared out the old data and that's why you don't see this error now. I managed to replicate the issue, and I'll put some defensive code in to avoid the error spamming the console. Thanks for the report.

@tastybento tastybento added bug in progress this is being worked on and removed Under Investigation labels Jan 2, 2024
@tastybento tastybento added done this has been completed and removed in progress this is being worked on labels Jan 2, 2024
@tastybento
Copy link
Member

This issue is resolved in the latest snapshot of Bentobox.

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

Successfully merging a pull request may close this issue.

2 participants