I have the following issue that I believe is caused by a subtle bug in the spigot code.
When trying to add new items to a bundle when using the BukkitObjectOutputStream/BukkitObjectInputStream, it throws a NPE saying
This seems to be caused by these lines I highlighted https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBundle.java#35-37,46-47.]
Related stacktrace of the NPE https://pastebin.com/raw/c7Msfd0n
Ability to use a BukkitObjectInputStream to create a bundle object.
(Noob's suggestion for fix: Initialize the this.items array upon instance creation. This could be completely wrong but I would be interested to hear what you think the problem could be ^^)
Run /kill with a non-empty bundle in your inventory. (/kill is used since this bug-producing code is from the InventoryRollbackPlus plugin, which triggers on death xD)
Test Plugin source: https://github.com/TechnicallyCoded/SpigotApiBugReport-Bundles