Skip to content

Conversation

@Janschuri
Copy link

Hi!
This is a small one-liner fix. I hadn’t looked a lot into this plugin’s code before, so I hope the change makes sense.
For me, it fixed an issue where I couldn’t edit custom items after reloading the plugin. I always got the message that I can edit the CustomItem, but nothing happened and the GUI kinda crashed and I had to reload the plugin. In the console there was this error:

[21:07:03 WARN]: [CustomCrafting] Task #692 for CustomCrafting v4.19.0.1 generated an exception java.lang.NullPointerException: Cannot invoke "org.bukkit.inventory.meta.ItemMeta.getPersistentDataContainer()" because "itemMeta" is null at wolfyutils-spigot-4.19-SNAPSHOT.jar/me.wolfyscript.utilities.api.inventory.custom_items.CustomItem.lambda$create$3(CustomItem.java:615) ~[wolfyutils-spigot-4.19-SNAPSHOT.jar:?] at java.base/java.util.Optional.map(Optional.java:260) ~[?:?] at wolfyutils-spigot-4.19-SNAPSHOT.jar/me.wolfyscript.utilities.api.inventory.custom_items.CustomItem.create(CustomItem.java:611) ~[wolfyutils-spigot-4.19-SNAPSHOT.jar:?] at wolfyutils-spigot-4.19-SNAPSHOT.jar/me.wolfyscript.utilities.api.inventory.custom_items.CustomItem.create(CustomItem.java:597) ~[wolfyutils-spigot-4.19-SNAPSHOT.jar:?] at customcrafting-spigot-4.19.0.1.jar/me.wolfyscript.customcrafting.gui.item_creator.MenuItemCreator.onUpdateAsync(MenuItemCreator.java:261) ~[customcrafting-spigot-4.19.0.1.jar:?] at wolfyutils-spigot-4.19-SNAPSHOT.jar/me.wolfyscript.utilities.api.inventory.gui.GuiWindow.openInventory(GuiWindow.java:278) ~[wolfyutils-spigot-4.19-SNAPSHOT.jar:?] at wolfyutils-spigot-4.19-SNAPSHOT.jar/me.wolfyscript.utilities.api.inventory.gui.GuiWindow.lambda$callUpdate$1(GuiWindow.java:268) ~[wolfyutils-spigot-4.19-SNAPSHOT.jar:?] at wolfyutils-spigot-4.19-SNAPSHOT.jar/me.wolfyscript.utilities.api.inventory.gui.GuiWindow.callUpdate(GuiWindow.java:270) ~[wolfyutils-spigot-4.19-SNAPSHOT.jar:?] at wolfyutils-spigot-4.19-SNAPSHOT.jar/me.wolfyscript.utilities.api.inventory.gui.GuiWindow.lambda$update$0(GuiWindow.java:261) ~[wolfyutils-spigot-4.19-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.scheduler.CraftTask.run(CraftTask.java:78) ~[paper-1.21.4.jar:1.21.4-138-5395ae3] at org.bukkit.craftbukkit.scheduler.CraftScheduler.mainThreadHeartbeat(CraftScheduler.java:474) ~[paper-1.21.4.jar:1.21.4-138-5395ae3] at net.minecraft.server.MinecraftServer.tickChildren(MinecraftServer.java:1659) ~[paper-1.21.4.jar:1.21.4-138-5395ae3] at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1529) ~[paper-1.21.4.jar:1.21.4-138-5395ae3] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1251) ~[paper-1.21.4.jar:1.21.4-138-5395ae3] at net.minecraft.server.MinecraftServer.lambda$spin$2(MinecraftServer.java:310) ~[paper-1.21.4.jar:1.21.4-138-5395ae3] at java.base/java.lang.Thread.run(Thread.java:1570) ~[?:?]

Let me know if there's a better way to approach it. Happy to adjust if needed.

Thanks for the awesome work on the plugin

Cheers
Janschuri

@Ste3et
Copy link

Ste3et commented Sep 6, 2025

Is it possible that these pr will be approved that we can update the server?
It will be help so much people if these works @WolfyScript

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.

2 participants