Describe the bug
I am using legacy version of kit editor. When I try to reset the kit and saving it (to remove the edited one), it doesn't reset it. And when I go into the ffa arena I can only use the custom one, because the default one gives me the error.
To Reproduce
The error appear when I click on the default kit book, when choosing to take the edited one or the default one.
Expected behavior
Give default kit
Errors and console logs
[10:37:16] [Server thread/ERROR]: Could not pass event PlayerInteractEvent to StrikePractice v3.8.1-SNAPSHOT
java.lang.NullPointerException: edited kit is null. Something bad happened
at ga.strikepractice.playerkits.b.b.i(KitEditorGUI.java:205) ~[StrikePractice-dev-105977109989-1692737761.jar:?]
at ga.strikepractice.playerkits.b.b.g(KitEditorGUI.java:191) ~[StrikePractice-dev-105977109989-1692737761.jar:?]
at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor368.execute(Unknown Source) ~[?:?]
at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[purpur-api-1.19.4-R0.1-SNAPSHOT.jar:?]
at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:77) ~[purpur-api-1.19.4-R0.1-SNAPSHOT.jar:git-Purpur-1985]
at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[purpur-api-1.19.4-R0.1-SNAPSHOT.jar:?]
at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[purpur-1.19.4.jar:git-Purpur-1985]
at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[purpur-1.19.4.jar:git-Purpur-1985]
at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:617) ~[purpur-api-1.19.4-R0.1-SNAPSHOT.jar:?]
at org.bukkit.craftbukkit.v1_19_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:564) ~[purpur-1.19.4.jar:git-Purpur-1985]
at org.bukkit.craftbukkit.v1_19_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:521) ~[purpur-1.19.4.jar:git-Purpur-1985]
at org.bukkit.craftbukkit.v1_19_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:516) ~[purpur-1.19.4.jar:git-Purpur-1985]
at org.bukkit.craftbukkit.v1_19_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:511) ~[purpur-1.19.4.jar:git-Purpur-1985]
at org.bukkit.craftbukkit.v1_19_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:507) ~[purpur-1.19.4.jar:git-Purpur-1985]
at net.minecraft.server.network.ServerGamePacketListenerImpl.handleUseItem(ServerGamePacketListenerImpl.java:2100) ~[?:?]
at net.minecraft.network.protocol.game.ServerboundUseItemPacket.handle(ServerboundUseItemPacket.java:32) ~[?:?]
at net.minecraft.network.protocol.game.ServerboundUseItemPacket.a(ServerboundUseItemPacket.java:8) ~[?:?]
at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:51) ~[?:?]
at net.minecraft.server.TickTask.run(TickTask.java:18) ~[purpur-1.19.4.jar:git-Purpur-1985]
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:1369) ~[purpur-1.19.4.jar:git-Purpur-1985]
at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:197) ~[purpur-1.19.4.jar:git-Purpur-1985]
at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?]
at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1346) ~[purpur-1.19.4.jar:git-Purpur-1985]
at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1339) ~[purpur-1.19.4.jar:git-Purpur-1985]
at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?]
at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1317) ~[purpur-1.19.4.jar:git-Purpur-1985]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1205) ~[purpur-1.19.4.jar:git-Purpur-1985]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:325) ~[purpur-1.19.4.jar:git-Purpur-1985]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
Describe the bug I am using legacy version of kit editor. When I try to reset the kit and saving it (to remove the edited one), it doesn't reset it. And when I go into the ffa arena I can only use the custom one, because the default one gives me the error.
To Reproduce The error appear when I click on the default kit book, when choosing to take the edited one or the default one. Expected behavior Give default kit
Errors and console logs [10:37:16] [Server thread/ERROR]: Could not pass event PlayerInteractEvent to StrikePractice v3.8.1-SNAPSHOT java.lang.NullPointerException: edited kit is null. Something bad happened at ga.strikepractice.playerkits.b.b.i(KitEditorGUI.java:205) ~[StrikePractice-dev-105977109989-1692737761.jar:?] at ga.strikepractice.playerkits.b.b.g(KitEditorGUI.java:191) ~[StrikePractice-dev-105977109989-1692737761.jar:?] at com.destroystokyo.paper.event.executor.asm.generated.GeneratedEventExecutor368.execute(Unknown Source) ~[?:?] at org.bukkit.plugin.EventExecutor$2.execute(EventExecutor.java:77) ~[purpur-api-1.19.4-R0.1-SNAPSHOT.jar:?] at co.aikar.timings.TimedEventExecutor.execute(TimedEventExecutor.java:77) ~[purpur-api-1.19.4-R0.1-SNAPSHOT.jar:git-Purpur-1985] at org.bukkit.plugin.RegisteredListener.callEvent(RegisteredListener.java:70) ~[purpur-api-1.19.4-R0.1-SNAPSHOT.jar:?] at io.papermc.paper.plugin.manager.PaperEventManager.callEvent(PaperEventManager.java:54) ~[purpur-1.19.4.jar:git-Purpur-1985] at io.papermc.paper.plugin.manager.PaperPluginManagerImpl.callEvent(PaperPluginManagerImpl.java:126) ~[purpur-1.19.4.jar:git-Purpur-1985] at org.bukkit.plugin.SimplePluginManager.callEvent(SimplePluginManager.java:617) ~[purpur-api-1.19.4-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.v1_19_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:564) ~[purpur-1.19.4.jar:git-Purpur-1985] at org.bukkit.craftbukkit.v1_19_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:521) ~[purpur-1.19.4.jar:git-Purpur-1985] at org.bukkit.craftbukkit.v1_19_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:516) ~[purpur-1.19.4.jar:git-Purpur-1985] at org.bukkit.craftbukkit.v1_19_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:511) ~[purpur-1.19.4.jar:git-Purpur-1985] at org.bukkit.craftbukkit.v1_19_R3.event.CraftEventFactory.callPlayerInteractEvent(CraftEventFactory.java:507) ~[purpur-1.19.4.jar:git-Purpur-1985] at net.minecraft.server.network.ServerGamePacketListenerImpl.handleUseItem(ServerGamePacketListenerImpl.java:2100) ~[?:?] at net.minecraft.network.protocol.game.ServerboundUseItemPacket.handle(ServerboundUseItemPacket.java:32) ~[?:?] at net.minecraft.network.protocol.game.ServerboundUseItemPacket.a(ServerboundUseItemPacket.java:8) ~[?:?] at net.minecraft.network.protocol.PacketUtils.lambda$ensureRunningOnSameThread$0(PacketUtils.java:51) ~[?:?] at net.minecraft.server.TickTask.run(TickTask.java:18) ~[purpur-1.19.4.jar:git-Purpur-1985] 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:1369) ~[purpur-1.19.4.jar:git-Purpur-1985] at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:197) ~[purpur-1.19.4.jar:git-Purpur-1985] at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:126) ~[?:?] at net.minecraft.server.MinecraftServer.pollTaskInternal(MinecraftServer.java:1346) ~[purpur-1.19.4.jar:git-Purpur-1985] at net.minecraft.server.MinecraftServer.pollTask(MinecraftServer.java:1339) ~[purpur-1.19.4.jar:git-Purpur-1985] at net.minecraft.util.thread.BlockableEventLoop.managedBlock(BlockableEventLoop.java:136) ~[?:?] at net.minecraft.server.MinecraftServer.waitUntilNextTick(MinecraftServer.java:1317) ~[purpur-1.19.4.jar:git-Purpur-1985] at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1205) ~[purpur-1.19.4.jar:git-Purpur-1985] at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:325) ~[purpur-1.19.4.jar:git-Purpur-1985] at java.lang.Thread.run(Thread.java:833) ~[?:?]
Versions: