Commit Graph

1 Commits

Author SHA1 Message Date
Minecrell
801e2ee3b1 Refresh player inventory when cancelling PlayerInteractEntityEvent (#1205)
When interacting with entities with an item, the client will assume
the interaction is successful, and update the held item on the
client. However, if the interaction is cancelled on the server side,
the client will still mistakenly remove/replace the item in hand.

Examples for this are milking cows with a bucket or dyeing sheep.
The bucket is replaced with milk and the dye removed from inventory.

Refresh the player inventory when PlayerInteractEntityEvent is
cancelled to avoid this problem.
2018-07-13 16:52:34 -04:00