Open YKDZ opened 2 years ago
I am unable to reproduce this issue. Not sure why it is happening. The code line, that seems to cause the issue for you, seems fine and shouldn't cause any issues like that. Make sure to update to WolfyUtilities 4.16.1 and Purpur too.
[22:04:00 INFO]: YK_DZ issued server command: /customcrafting reload
[22:04:00 INFO]: [CustomCrafting] Loaded fallback language "en_US" v6.0.0 translated by WolfyScript
[22:04:00 INFO]: [CustomCrafting] Loaded active language "zh_CN" v5.0.0 translated by WolfyScript
[22:04:00 INFO]: [CustomCrafting] ________[加载 配方/物品]________
[22:04:00 INFO]: [CustomCrafting] - - - - [Local Storage] - - - -
[22:04:00 INFO]: [CustomCrafting] [LOCAL] Looking through data folder...
[22:04:00 INFO]: [CustomCrafting] [LOCAL] ---------[物品]---------
[22:04:00 INFO]: [CustomCrafting] [LOCAL] --------[配方]--------
[22:04:00 WARN]: [CustomCrafting] [LOCAL] [Error] Invalid Recipe: "customcrafting:direct/stone_trident": Invalid result! Recipe must have a non-air result!
[22:04:00 WARN]: [CustomCrafting] [LOCAL] [Error] Caused by: Invalid result! Recipe must have a non-air result!
[22:04:00 WARN]: [CustomCrafting] [LOCAL] [Error] Invalid Recipe: "customcrafting:direct/wooden_trident": Invalid result! Recipe must have a non-air result!
[22:04:00 WARN]: [CustomCrafting] [LOCAL] [Error] Caused by: Invalid result! Recipe must have a non-air result!
[22:04:00 WARN]: [CustomCrafting] [LOCAL] [Error] Invalid Recipe: "customcrafting:iscured/copper_trident": Invalid result! Recipe must have a non-air result!
[22:04:00 WARN]: [CustomCrafting] [LOCAL] [Error] Caused by: Invalid result! Recipe must have a non-air result!
[22:04:01 WARN]: [CustomCrafting] [LOCAL] [Error] Invalid Recipe: "customcrafting:iscured/diamond_trident": Invalid result! Recipe must have a non-air result!
[22:04:01 WARN]: [CustomCrafting] [LOCAL] [Error] Caused by: Invalid result! Recipe must have a non-air result!
[22:04:01 WARN]: [CustomCrafting] [LOCAL] [Error] Invalid Recipe: "customcrafting:iscured/golden_trident": Invalid result! Recipe must have a non-air result!
[22:04:01 WARN]: [CustomCrafting] [LOCAL] [Error] Caused by: Invalid result! Recipe must have a non-air result!
[22:04:01 WARN]: [CustomCrafting] [LOCAL] [Error] Invalid Recipe: "customcrafting:iscured/iron_trident": Invalid result! Recipe must have a non-air result!
[22:04:01 WARN]: [CustomCrafting] [LOCAL] [Error] Caused by: Invalid result! Recipe must have a non-air result!
[22:04:01 WARN]: [CustomCrafting] [LOCAL] [Error] Invalid Recipe: "customcrafting:iscured/netherite_trident": Invalid result! Recipe must have a non-air result!
[22:04:01 WARN]: [CustomCrafting] [LOCAL] [Error] Caused by: Invalid result! Recipe must have a non-air result!
[22:04:01 INFO]: [CustomCrafting] [LOCAL] Loaded 246 recipes; Skipped: 7 error/s, 0 already existing
[22:04:01 INFO]: [CustomCrafting] [LOCAL_OLD] Loaded 0 recipes; Skipped: 0 error/s, 0 already existing
[22:04:01 INFO]: [CustomCrafting] [LOCAL_LEGACY] Loaded 0 recipes; Skipped: 0 error/s, 0 already existing
[22:04:01 INFO]: [CustomCrafting] [LOCAL] Loaded 246 recipes
[22:04:01 INFO]: [CustomCrafting]
[22:04:01 INFO]: [CustomCrafting] Indexing Recipe Book...
[22:04:01 INFO]: [CustomCrafting] Indexed Recipe Book!
[22:04:01 ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing 'customcrafting reload' in me.wolfyscript.customcrafting.commands.CommandCC(customcrafting)
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:182) ~[purpur-api-1.18.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_18_R2.CraftServer.dispatchCommand(CraftServer.java:906) ~[purpur-1.18.2.jar:git-Purpur-1625]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleCommand(ServerGamePacketListenerImpl.java:2389) ~[?:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:2200) ~[?:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:2181) ~[?:?]
at net.minecraft.network.protocol.game.ServerboundChatPacket.handle(ServerboundChatPacket.java:46) ~[?:?]
at net.minecraft.network.protocol.game.ServerboundChatPacket.a(ServerboundChatPacket.java:6) ~[?:?]
at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$1(PacketUtils.java:51) ~[?:?]
at net.minecraft.server.TickTask.run(TickTask.java:18) ~[purpur-1.18.2.jar:git-Purpur-1625]
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:1426) ~[purpur-1.18.2.jar:git-Purpur-1625]
at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:188) ~[purpur-1.18.2.jar:git-Purpur-1625]
at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1403) ~[purpur-1.18.2.jar:git-Purpur-1625]
at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1396) ~[purpur-1.18.2.jar:git-Purpur-1625]
at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1374) ~[purpur-1.18.2.jar:git-Purpur-1625]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1256) ~[purpur-1.18.2.jar:git-Purpur-1625]
at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:320) ~[purpur-1.18.2.jar:git-Purpur-1625]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "org.bukkit.enchantments.Enchantment.getStartLevel()" because the return value of "org.bukkit.enchantments.EnchantmentWrapper.getEnchantment()" is null
at org.bukkit.enchantments.EnchantmentWrapper.getStartLevel(EnchantmentWrapper.java:32) ~[purpur-api-1.18.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.inventory.ItemStack.addEnchantment(ItemStack.java:411) ~[purpur-api-1.18.2-R0.1-SNAPSHOT.jar:?]
at me.wolfyscript.utilities.util.inventory.item_builder.AbstractItemBuilder.addEnchantment(AbstractItemBuilder.java:86) ~[wolfyutils-spigot-4.16.1.0.jar:?]
at me.wolfyscript.customcrafting.gui.item_creator.ButtonArmorSlotToggle.<init>(ButtonArmorSlotToggle.java:49) ~[customcrafting-spigot-3.16.3.3.jar:?]
at me.wolfyscript.customcrafting.gui.item_creator.tabs.TabArmorSlots.register(TabArmorSlots.java:50) ~[customcrafting-spigot-3.16.3.3.jar:?]
at me.wolfyscript.customcrafting.gui.item_creator.MenuItemCreator.lambda$onInit$16(MenuItemCreator.java:161) ~[customcrafting-spigot-3.16.3.3.jar:?]
at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]
at me.wolfyscript.customcrafting.gui.item_creator.MenuItemCreator.onInit(MenuItemCreator.java:161) ~[customcrafting-spigot-3.16.3.3.jar:?]
at me.wolfyscript.utilities.api.inventory.gui.GuiCluster.registerGuiWindow(GuiCluster.java:105) ~[wolfyutils-spigot-4.16.1.0.jar:?]
at me.wolfyscript.customcrafting.gui.item_creator.ClusterItemCreator.onInit(ClusterItemCreator.java:43) ~[customcrafting-spigot-3.16.3.3.jar:?]
at me.wolfyscript.utilities.api.inventory.gui.InventoryAPI.lambda$reset$2(InventoryAPI.java:173) ~[wolfyutils-spigot-4.16.1.0.jar:?]
at java.util.HashMap.forEach(HashMap.java:1421) ~[?:?]
at me.wolfyscript.utilities.api.inventory.gui.InventoryAPI.reset(InventoryAPI.java:173) ~[wolfyutils-spigot-4.16.1.0.jar:?]
at me.wolfyscript.customcrafting.commands.cc_subcommands.ReloadSubCommand.onCommand(ReloadSubCommand.java:75) ~[customcrafting-spigot-3.16.3.3.jar:?]
at me.wolfyscript.customcrafting.commands.IndexCommand.execute(IndexCommand.java:54) ~[customcrafting-spigot-3.16.3.3.jar:?]
at me.wolfyscript.customcrafting.commands.CommandCC.execute(CommandCC.java:63) ~[customcrafting-spigot-3.16.3.3.jar:?]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:172) ~[purpur-api-1.18.2-R0.1-SNAPSHOT.jar:?]
... 20 more
I update plugin and get this error again. I will try to remove other plugins to test.
When I remove my CMI I find that the problem will not appear. My CMI version is 9.1.3.0. Maybe this is the cause of the error.
First thing I would suggest is, that you should update CMI to the latest version and check again.
I suspect that CMI is doing something internally with enchantments, that causes the error.
When I update to CMI 9.1.4.7, error will also appear:
[21:30:45 ERROR]: null
org.bukkit.command.CommandException: Unhandled exception executing 'customcrafting reload' in me.wolfyscript.customcrafting.commands.CommandCC(customcrafting)
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:182) ~[purpur-api-1.18.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_18_R2.CraftServer.dispatchCommand(CraftServer.java:906) ~[purpur-1.18.2.jar:git-Purpur-1625]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleCommand(ServerGamePacketListenerImpl.java:2389) ~[?:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:2200) ~[?:?]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleChat(ServerGamePacketListenerImpl.java:2181) ~[?:?]
at net.minecraft.network.protocol.game.ServerboundChatPacket.handle(ServerboundChatPacket.java:46) ~[?:?]
at net.minecraft.network.protocol.game.ServerboundChatPacket.a(ServerboundChatPacket.java:6) ~[?:?]
at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$1(PacketUtils.java:51) ~[?:?]
at net.minecraft.server.TickTask.run(TickTask.java:18) ~[purpur-1.18.2.jar:git-Purpur-1625]
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:1426) ~[purpur-1.18.2.jar:git-Purpur-1625]
at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:188) ~[purpur-1.18.2.jar:git-Purpur-1625]
at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1403) ~[purpur-1.18.2.jar:git-Purpur-1625]
at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1396) ~[purpur-1.18.2.jar:git-Purpur-1625]
at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1374) ~[purpur-1.18.2.jar:git-Purpur-1625]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1256) ~[purpur-1.18.2.jar:git-Purpur-1625]
at net.minecraft.server.MinecraftServer.lambda$spin$1(MinecraftServer.java:320) ~[purpur-1.18.2.jar:git-Purpur-1625]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Caused by: java.lang.NullPointerException: Cannot invoke "org.bukkit.enchantments.Enchantment.getStartLevel()" because the return value of "org.bukkit.enchantments.EnchantmentWrapper.getEnchantment()" is null
at org.bukkit.enchantments.EnchantmentWrapper.getStartLevel(EnchantmentWrapper.java:32) ~[purpur-api-1.18.2-R0.1-SNAPSHOT.jar:?]
at org.bukkit.inventory.ItemStack.addEnchantment(ItemStack.java:411) ~[purpur-api-1.18.2-R0.1-SNAPSHOT.jar:?]
at me.wolfyscript.utilities.util.inventory.item_builder.AbstractItemBuilder.addEnchantment(AbstractItemBuilder.java:86) ~[wolfyutils-spigot-4.16.1.0.jar:?]
at me.wolfyscript.customcrafting.gui.item_creator.ButtonArmorSlotToggle.<init>(ButtonArmorSlotToggle.java:49) ~[customcrafting-spigot-3.16.3.3.jar:?]
at me.wolfyscript.customcrafting.gui.item_creator.tabs.TabArmorSlots.register(TabArmorSlots.java:50) ~[customcrafting-spigot-3.16.3.3.jar:?]
at me.wolfyscript.customcrafting.gui.item_creator.MenuItemCreator.lambda$onInit$16(MenuItemCreator.java:161) ~[customcrafting-spigot-3.16.3.3.jar:?]
at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]
at me.wolfyscript.customcrafting.gui.item_creator.MenuItemCreator.onInit(MenuItemCreator.java:161) ~[customcrafting-spigot-3.16.3.3.jar:?]
at me.wolfyscript.utilities.api.inventory.gui.GuiCluster.registerGuiWindow(GuiCluster.java:105) ~[wolfyutils-spigot-4.16.1.0.jar:?]
at me.wolfyscript.customcrafting.gui.item_creator.ClusterItemCreator.onInit(ClusterItemCreator.java:43) ~[customcrafting-spigot-3.16.3.3.jar:?]
at me.wolfyscript.utilities.api.inventory.gui.InventoryAPI.lambda$reset$2(InventoryAPI.java:173) ~[wolfyutils-spigot-4.16.1.0.jar:?]
at java.util.HashMap.forEach(HashMap.java:1421) ~[?:?]
at me.wolfyscript.utilities.api.inventory.gui.InventoryAPI.reset(InventoryAPI.java:173) ~[wolfyutils-spigot-4.16.1.0.jar:?]
at me.wolfyscript.customcrafting.commands.cc_subcommands.ReloadSubCommand.onCommand(ReloadSubCommand.java:75) ~[customcrafting-spigot-3.16.3.3.jar:?]
at me.wolfyscript.customcrafting.commands.IndexCommand.execute(IndexCommand.java:54) ~[customcrafting-spigot-3.16.3.3.jar:?]
at me.wolfyscript.customcrafting.commands.CommandCC.execute(CommandCC.java:63) ~[customcrafting-spigot-3.16.3.3.jar:?]
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:172) ~[purpur-api-1.18.2-R0.1-SNAPSHOT.jar:?]
... 20 more
How sad is this : ( But this problem may did not influence so much, for it will not appear when using, just when reload plugin in game. So at least it didn't affect my normal using.
What happened?
An error will appear when reload plugin
How can the bug be reproduced?
Just reload
Expected Behaviour?
nothing
Plugin version
wolfyutils-spigot-4.16.0.0 customcrafting-spigot-3.16.3.3
Server software
Purpur 1.18.2
Relevant log output
Submit issue