Closed crashdemons closed 5 years ago
After much obscure research there appears to be one exception to Bukkit.getItemFactory().getItemMeta(...)
returning an object, one that is not listed in the javadoc: When the item type is AIR.
I'm not sure why I didn't have this error when testing previous versions though.
The line causing the NPE is indicated by logs to be Line 69 of LKC in in v0.0.2: https://github.com/crashdemons/LoreKillCounter/blob/ab5401911c0fe3e9a3db780d40f444d4476f69a0/src/main/java/com/github/crashdemons/lorekillcounter/LoreKillCounter.java#L65-L69
The NPE seems to imply the meta is null, however it is already checked and generated if null - additionally, Item.getItemMeta's code also now performs this same check/construction in spigot-api.
I am really confused by this.
The trace is below: