Environment
-
Sponge Version: <7.1.6
-
Plugin Version: 1.4.0
What happens?
When I type /cr list I get a java.lang.NullPointerException.
I am using this plugin on a 1.12.2 hunger games-like server, and currently have 147 refillable chests (yes, it took me a couple of hours :s). The error occured when I created the 120th refillable chest, maybe it's some sort of index out of bouds issue? Is the memory for storing these chests dynamically allocated? Just throwing out thoughts...
Expected result
A list of all the refillable containers in the chat.
More information
Error log from the terminal:
(pastebin, easier to read)
[19:56:20] [Server thread/INFO] [minecraft/DedicatedServer]: Error occurred while executing command: null [19:56:20] [Server thread/ERROR] [Sponge]: Error occurred while executing command 'cr l' for source DedicatedServer: null java.lang.NullPointerException: null at io.github.aquerr.chestrefill.commands.ListCommand.execute(ListCommand.java:64) ~[ListCommand.class:?] at org.spongepowered.api.command.args.ChildCommandElementExecutor.execute(ChildCommandElementExecutor.java:255) ~[ChildCommandElementExecutor.class:1.12.2-2825-7.1.6] at org.spongepowered.api.command.spec.CommandSpec.process(CommandSpec.java:388) ~[CommandSpec.class:1.12.2-2825-7.1.6] at org.spongepowered.api.command.dispatcher.SimpleDispatcher.process(SimpleDispatcher.java:340) ~[SimpleDispatcher.class:1.12.2-2825-7.1.6] at org.spongepowered.common.command.SpongeCommandManager.process(SpongeCommandManager.java:337) [SpongeCommandManager.class:1.12.2-2825-7.1.6] at net.minecraft.command.ServerCommandManager.func_71556_a(SourceFile:1156) [dh.class:?] at net.minecraft.server.dedicated.DedicatedServer.func_71333_ah(DedicatedServer.java:433) [nz.class:?] at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:398) [nz.class:?] at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668) [MinecraftServer.class:?] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526) [MinecraftServer.class:?] at java.lang.Thread.run(Unknown Source) [?:1.8.0_221]
I should maybe point out that my containers.json file has about 50.000 lines...
(Got a big kit assigned to 147 chests :s)
Is it a memory problem? Can it be fixed?
Suggestion: my kits.json has 500 lines (it's just 1 kit). Maybe don't copy every item from the kit to the chest items-attribute in container.json, this results in 500 extra line per chest registry in containers.json, maybe this leads to memory corruption while loading it when playing live? (50.000 lines!) Maybe try creating a pointer to the kit (in "items") in containers.json for every chest instead of copying all the items from the kit.
/cr list is the only command that doesn't work, everything else works fine.