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

fix remove potions without basedata from grid/storages #224

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

scorninpc
Copy link

fix problem of:

[15:09:27 ERROR]: Could not pass event InventoryClickEvent to Slimefun vDev - 1157
java.lang.NullPointerException: Cannot invoke "org.bukkit.potion.PotionData.equals(Object)" because the return value of "org.bukkit.inventory.meta.PotionMeta.getBasePotionData()" is null
	at Networks - DEV 50 (git 3de3c).jar/io.github.sefiraat.networks.utils.StackUtils.canQuickEscapeMetaVariant(StackUtils.java:271) ~[Networks - DEV 50 (git 3de3c).jar:?]
	at Networks - DEV 50 (git 3de3c).jar/io.github.sefiraat.networks.utils.StackUtils.itemsMatch(StackUtils.java:80) ~[Networks - DEV 50 (git 3de3c).jar:?]
	at Networks - DEV 50 (git 3de3c).jar/io.github.sefiraat.networks.network.NetworkRoot.getItemStack(NetworkRoot.java:443) ~[Networks - DEV 50 (git 3de3c).jar:?]
	at Networks - DEV 50 (git 3de3c).jar/io.github.sefiraat.networks.slimefun.network.grid.AbstractGrid.addToCursor(AbstractGrid.java:308) ~[Networks - DEV 50 (git 3de3c).jar:?]
	at Networks - DEV 50 (git 3de3c).jar/io.github.sefiraat.networks.slimefun.network.grid.AbstractGrid.retrieveItem(AbstractGrid.java:278) ~[Networks - DEV 50 (git 3de3c).jar:?]
	at Networks - DEV 50 (git 3de3c).jar/io.github.sefiraat.networks.slimefun.network.grid.AbstractGrid.lambda$updateDisplay$1(AbstractGrid.java:196) ~[Networks - DEV 50 (git 3de3c).jar:?]
	at Slimefun4-Dev.jar/me.mrCookieSlime.CSCoreLibPlugin.general.Inventory.MenuListener.onClick(MenuListener.java:53) ~[Slimefun4-Dev.jar:?]
	at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor29.execute(Unknown Source) ~[?:?]
	at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[purpur-api-1.20.6-R0.1-SNAPSHOT.jar:?]
	at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:77) ~[purpur-api-1.20.6-R0.1-SNAPSHOT.jar:1.20.6-2233-0d6766e]
	at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[purpur-api-1.20.6-R0.1-SNAPSHOT.jar:?]
	at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
	at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:131) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
	at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:628) ~[purpur-api-1.20.6-R0.1-SNAPSHOT.jar:?]
	at net.minecraft.server.network.ServerGamePacketListenerImpl.handleContainerClick(ServerGamePacketListenerImpl.java:3260) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
	at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:69) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
	at net.minecraft.network.protocol.game.ServerboundContainerClickPacket.handle(ServerboundContainerClickPacket.java:33) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
	at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:55) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
	at net.minecraft.server.TickTask.run(TickTask.java:18) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
	at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:151) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
	at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:24) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:1546) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
	at net.minecraft.server.MinecraftServer.doRunTask(MinecraftServer.java:195) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
	at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:125) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
	at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1523) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
	at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1446) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
	at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:135) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
	at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1412) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
	at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1273) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:326) ~[purpur-1.20.6.jar:1.20.6-2233-0d6766e]
	at java.base/java.lang.Thread.run(Thread.java:1583) ~[?:?]

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

Successfully merging this pull request may close these issues.

1 participant