Daniel12321 / AdventureMMO

MIT License
11 stars 11 forks source link

Fix breaking inventories with ItemStacks of NONE. #6

Closed dualspiral closed 8 years ago

dualspiral commented 8 years ago

If an item of type NONE is inserted into an inventory, it almost certainly cause inventories to break - this is something I found when doing stuff with Nucleus, not obvious, I know! Instead, you should be using Inventory#clear() on your query, which clears the item.

This should fix https://forums.spongepowered.org/t/trophy-adventuremmo-v1-6-0-mc-1-8-9-1-10-2-the-great-combat-update/14985/107?u=dualspiral

Daniel12321 commented 8 years ago

Thanks a lot, ill fix it in my plugin right now

dualspiral commented 8 years ago

You just need to pull this PR, see the "Files Changed" tab for the code I wrote.