StackableItems

StackableItems

99k Downloads

[Bug]: si command reload

ErythroCraft opened this issue ยท 1 comments

commented

Hello

via using the cmd /si reload got a problem.

org.bukkit.command.CommandException: Unhandled exception executing command 'si' in plugin StackableItems v1.1.0 at org.bukkit.command.PluginCommand.execute(PluginCommand.java:47) ~[spigot-api-1.18.2-R0.1-SNAPSHOT.jar:?] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:149) ~[spigot-api-1.18.2-R0.1-SNAPSHOT.jar:?] at org.bukkit.craftbukkit.v1_18_R2.CraftServer.dispatchCommand(CraftServer.java:826) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3482-Spigot-42b6152-e87f2e3] at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:1957) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3482-Spigot-42b6152-e87f2e3] at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:1796) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3482-Spigot-42b6152-e87f2e3] at net.minecraft.server.network.PlayerConnection.a(PlayerConnection.java:1777) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3482-Spigot-42b6152-e87f2e3] at net.minecraft.network.protocol.game.PacketPlayInChat.a(PacketPlayInChat.java:46) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3482-Spigot-42b6152-e87f2e3] at net.minecraft.network.protocol.game.PacketPlayInChat.a(PacketPlayInChat.java:1) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3482-Spigot-42b6152-e87f2e3] at net.minecraft.network.protocol.PlayerConnectionUtils.lambda$0(PlayerConnectionUtils.java:31) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3482-Spigot-42b6152-e87f2e3] at net.minecraft.server.TickTask.run(SourceFile:18) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3482-Spigot-42b6152-e87f2e3] at net.minecraft.util.thread.IAsyncTaskHandler.d(SourceFile:157) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3482-Spigot-42b6152-e87f2e3] at net.minecraft.util.thread.IAsyncTaskHandlerReentrant.d(SourceFile:23) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3482-Spigot-42b6152-e87f2e3] at net.minecraft.server.MinecraftServer.b(MinecraftServer.java:1190) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3482-Spigot-42b6152-e87f2e3] at net.minecraft.server.MinecraftServer.d(MinecraftServer.java:1) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3482-Spigot-42b6152-e87f2e3] at net.minecraft.util.thread.IAsyncTaskHandler.y(SourceFile:131) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3482-Spigot-42b6152-e87f2e3] at net.minecraft.server.MinecraftServer.be(MinecraftServer.java:1169) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3482-Spigot-42b6152-e87f2e3] at net.minecraft.server.MinecraftServer.y(MinecraftServer.java:1162) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3482-Spigot-42b6152-e87f2e3] at net.minecraft.util.thread.IAsyncTaskHandler.c(SourceFile:140) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3482-Spigot-42b6152-e87f2e3] at net.minecraft.server.MinecraftServer.x(MinecraftServer.java:1146) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3482-Spigot-42b6152-e87f2e3] at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:1051) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3482-Spigot-42b6152-e87f2e3] at net.minecraft.server.MinecraftServer.lambda$0(MinecraftServer.java:304) ~[spigot-1.18.2-R0.1-SNAPSHOT.jar:3482-Spigot-42b6152-e87f2e3] at java.lang.Thread.run(Thread.java:833) [?:?] Caused by: java.lang.NullPointerException: Cannot invoke "org.bukkit.configuration.ConfigurationSection.getKeys(boolean)" because "itemSection" is null at haveric.stackableItems.util.SIItems.loadItemsFile(SIItems.java:119) ~[?:?] at haveric.stackableItems.util.SIItems.reload(SIItems.java:102) ~[?:?] at haveric.stackableItems.Commands.onCommand(Commands.java:91) ~[?:?] at org.bukkit.command.PluginCommand.execute(PluginCommand.java:45) ~[spigot-api-1.18.2-R0.1-SNAPSHOT.jar:?] ... 21 more

commented

Apologies for the late reply, but this is likely happening due to an empty config section similar to this:

allWorlds:
  default:
  player:
    MIN: 32
    MAX: 32

I'll work on some better error reporting/handling here to avoid this happening, but if you or anyone is still having issues with this, you can just remove the empty section (in this case, the default with nothing under it)