Kits

Kits

5.4k Downloads

[1.18.1] Can't create kits

MrRubberDucky opened this issue ยท 6 comments

commented

Expected behavior

Kit is created successfully

Observed/actual behavior

The kit create command produces following chat message:
"An unexpected error occured while trying to execute that command"
and following error message appears in console log: https://pastebin.com/RPnqhSiv
(oh yea ignore the (1) near the filename, I just like downloading the same thing again to be sure)

Steps/models to reproduce

Try to create a kit with /kit add test 1 s

Version

1.4.0-mc1.18

Agreements

  • I am running the latest version of the mod.
  • My version of Minecraft is supported.
  • I have searched for and ensured there isn't already an open issue regarding this.

Other

Mods installed on server:

architectury-3.4.9, banhammer-0.4.2+1.18, bclib-1.2.1, better-end-1.0.0, bfapi, cloth-config-6.1.48-fabric, commandspy-1.2.4, disfabric-1.18-1.3.5, Dynmap-3.3-beta-4-fabric-1.18, easyauth-mc1.18-2.0.5, egg-of-capitalism-mc1.18-3.0, essential_commands-0.19.0-mc1.18.1, fabric-api-0.45.2+1.18, fabric-furnaces-2.0.1-1.17, fabric-language-kotlin-1.7.1+kotlin.1.6.10, fabric-permissions-api-v0.1, fabric-restart-1.4.1+1.18.1, fabric-tree-chopper-0.8.0, fabriccrossdimtpfix-0.3.0, FabricPvP-0.1.0, FabricSit-1.7.1, ferritecore-4.0.0-fabric, flan-1.18-1.6.6-fabric, globalspawn-1.5.0-1.18.1, GolfIV-0.4.4, gunpowder-base-1.1.1.1+1.18.1, gunpowder-currency-1.0.8+gunpowder.1.1.1.1.mc.1.18.1, gunpowder-signshop-1.0.8+gunpowder.1.1.1.1.mc.1.18.1, Harvest-fabric-1.16.1-1.0.1, hat-command-1.18-2.3.0, head-name-fix-1.1.0, headindex-1.0.4, healthcare-1.0.10, hewo-2.1.0-1.18.x, holograms-1.3.1+1.18, impersonate-2.4.0, inmis-2.4.0-1.18, InvView-1.4.8-1.18+, IronChests-1.5.3, itemflexer-1.2.3, kits-1.4.0-mc1.18, krypton-0.1.6, lazydfu-0.1.2, ledger-1.2.0, lenientdeath-1.18-0.7.5, lithium-fabric-mc1.18.1-0.7.7, logprot-fabric-1.18-1.4, LuckPerms-Fabric-5.3.86, minimotd-fabric-mc1.18-2.0.5, plasmovoice-fabric-1.18.1-1.2.9, player-events-2.2.2, player-events-api-2.2.2, progression-1.0.0+1.18, reroll-1.4.0-1.18.1, RoughlyEnoughItems-7.1.357, spark-fabric, styled-chat-1.2.3+1.18, styledplayerlist-2.1.3+1.18, Terralith_v2.0.9_Fabric+Forge, textile_backup-2.3.0-1.18, vanilla-hammers-3.2.0-1.18.1, villagerfix-1.0.1, winged-1.18.1-3.1.0, worldedit-mod-7.2.8

commented

Thanks for the report!

Currently, I'm having trouble reproducing this issue. I'm wondering if there is somehow a mod incompat...

If you run the server with just Kits and Fabric API, do things work as expected?


I'd also like to dive a bit deeper into this particular error. If mc generates a crash log file, that would also be useful.
(located in crash-reports directory of the server)

commented

If I run the server with just Kits and Fabric API (0.45.2) I get the following crash until I add LuckPerms:

Description: Exception in server tick loop
java.lang.NullPointerException: Cannot read the array length because "<local2>" is null
at dev.jpcode.kits.KitsMod.reloadKits(KitsMod.java:81)
at net.fabricmc.fabric.api.event.lifecycle.v1.ServerLifecycleEvents.lambda$static$0(ServerLifecycleEvents.java:37)
at net.minecraft.server.MinecraftServer.handler$zbm000$beforeSetupServer(MinecraftServer.java:1768)
at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:657)
at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:270)
at java.base/java.lang.Thread.run(Thread.java:833)

When I add LuckPerms back, the server boots up fine and I can create kits just fine

Findings:
The server seems to be fine with all my mods but GolfIV, if the mod is present, the /kit add will error with the same error as above and /kit claim will error out with following:

[08:57:59] [Server thread/ERROR]: Command exception: /kit claim test
java.lang.NullPointerException: Cannot invoke "dev.jpcode.kits.Kit.cooldown()" because "kit" is null
at dev.jpcode.kits.KitsCommandRegistry.lambda$register$2(KitsCommandRegistry.java:98) ~[kits-1.4.0-mc1.18(3).jar:?]
at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:263) ~[brigadier-1.0.18.jar:?]
at net.minecraft.class_2170.redirect$zbd000$performCommand(class_2170.java:547) ~[server-intermediary.jar:?]
at net.minecraft.class_2170.method_9249(class_2170.java:262) ~[server-intermediary.jar:?]
at net.minecraft.class_3244.method_14370(class_3244.java:1229) ~[server-intermediary.jar:?]
at net.minecraft.class_3244.method_31286(class_3244.java:1213) ~[server-intermediary.jar:?]
at net.minecraft.class_3244.method_12048(class_3244.java:1196) ~[server-intermediary.jar:?]
at net.minecraft.class_2797.method_12115(class_2797.java:30) ~[server-intermediary.jar:?]
at net.minecraft.class_2797.method_11054(class_2797.java:7) ~[server-intermediary.jar:?]
at net.minecraft.class_2600.method_11072(class_2600.java:21) ~[server-intermediary.jar:?]
at net.minecraft.class_3738.run(class_3738.java:18) ~[server-intermediary.jar:?]
at net.minecraft.class_1255.method_18859(class_1255.java:151) ~[server-intermediary.jar:?]
at net.minecraft.class_4093.method_18859(class_4093.java:23) ~[server-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_24306(MinecraftServer.java:780) ~[server-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_18859(MinecraftServer.java:162) ~[server-intermediary.jar:?]
at net.minecraft.class_1255.method_16075(class_1255.java:125) ~[server-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_20415(MinecraftServer.java:762) ~[server-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_16075(MinecraftServer.java:756) ~[server-intermediary.jar:?]
at net.minecraft.class_1255.method_5383(class_1255.java:110) ~[server-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_16208(MinecraftServer.java:740) ~[server-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:688) ~[server-intermediary.jar:?]
at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:270) ~[server-intermediary.jar:?]
at java.lang.Thread.run(Thread.java:833) [?:?]

Setting these settings in GolfIV_config.json:

"survival": {
"_comment_legalise": "// Whether to enable 'legalising' survival items.",
"_comment_legaliseWholeInventory": "// Whether to check whole inventory when connecting / changing dimensions, etc.",
"legaliseWholeInventory": false,
"creative": {
"_comment_legaliseWholeInventory": "// Whether to check whole inventory when connecting / changing dimensions, etc.",
"legaliseWholeInventory": false,

Seems to stop the mod from erroring out while claiming but still errors out with the same error when creating a kit.
The rest of the options don't have any effect when it comes to adding kits, at least I think since I had to go away for a bit and didn't manage to test it fully.

Hopefully this bit of information helps

commented

Ah, LuckPerms, forgot my mod's own requirements. Good call on re-adding it.

Ooh, great find on the GolfIV issue. I'll do some more extensive investigation to see if I can work around whatever restrictions they have in place.

commented

This issue should be resolved as of the latest release of kits! (v1.4.1)

commented

This issue should be resolved as of the latest release of kits! (v1.4.1)

Oh that's rad, thank you for fixing it! :)

commented

Thanks for the detailed feedback on this issue, make coming up with a solution much easier