Sorry @red51 yet another message!
The method:
inventory.insertNewCustomItem(EMERALD, 0, 1);
Work well for adding new custom items to the inventory (in the first available free slot or stacks if item already exists), however, it does not generate the nice inventory addition notification/animation on the lower right hand corner of the screen.
The following method does generate a nice notification/animation on the lower right hand corner;
inventory.insertNewCustomItem(EMERALD, 0, 1, 0, Inventory.SlotType.Inventory);
However, the above second method requires that I specify a slot (in my examples case - slot 0) the result of which is the item already occupying the slot(0) gets deleted.
Now I have tried writing some code to analyse the inventory (so I can use method 2) so I can allocate the correct slot (or stack if needed), however using item.getName() I simply get "apiitem" which isn't going to work.
The ideal solution would be a notification/animation on method 1.
Or, a new method like method 1;
inventory.insertNewCustomItemWithGuiFeedback(EMERALD, 0, 1);
