rutgerkok / Pokkit

Nukkit plugin that is able to load Bukkit plugins. Bring your Bukkit plugins to Minecraft PE!
Other
79 stars 27 forks source link

Passing "null" ItemStacks to setItem() or similar methods gives a NullPointerException #84

Closed RaynLegends closed 7 years ago

RaynLegends commented 7 years ago

Bukkit threats null ItemStacks as "empty" while Nukkit does not. Using Pokkit, methods like player.getInventory().setChestplate(null) throw a NullPointerException instead of accepting the item as empty.

rutgerkok commented 7 years ago

I think the change mentioned here should fix the issue everywhere in Pokkit. I hope it doesn't cause other side effects. 😄

RaynLegends commented 7 years ago

That was exactly what I was planning to do, it should work :)