-
Type:
Bug
-
Resolution: Fixed
-
Priority:
Minor
-
None
-
Affects Version/s: None
-
None
When cancelling a PlayerDropItemEvent for a single item it will try to add the item back into the inventory. If the player has a similar item in the hand as the dropped one then it will add the item to that stack. This can be a full stack if the item is dropped from inside the inventory either by pressing the Drop button or putting it outside of the inventory. It will then add the item to the stack in the hand (not the one it was previously in or the cursor) ignoring the max stack size of that stack.
Here as seen in the code will just increase the size of the stack without doing any checking for the max stack size of that item type.
Additional to fixing this stack issue it might be a good idea to look into making the item get put back into the slot or cursor that it initially originated from.