GlowstoneMC/Glowstone — pull request #484 by Johni0702 (2014-10-24 15:29:26+00:00)
Title: Fixed window click logic

This tries to fix all window click logic.
Related ticket: #1

### New features:
* Adds shift clicking logic
* Handle taking items from crafting result and call `GlowCraftingInventory.craft()` accordingly
### Fixes:
* Fixed hotbar swapping (number keys)
* Prevent items from being placed in the wrong slots (dirt as their pants, placing items in the output of crafting table, etc.)
* Fixed double-clicks not taking all items from hotbar (when the player is in their inventory, double-click wasn't collecting the hotbar slots 6-9)
* Fixed dragging items creating stacks with too many items (splitting a stack of items on top of another one crafted stacks with more than 64 items)

### Not included in this PR:
* Removing items from the crafting matrix (this should be done in `CraftingManager.removeItems`). Note that this causes your whole inventory to be filled when you shift-click at the output slot of a crafting recipe. This bug will vanish once said method is implemented.
* Filtering of items for all different kinds of inventories (`itemShiftClickAllowed` and `itemPlaceAllowed` methods). This PR only implements those for the player inventory (armor slots).

Plugin used to test the InventoryClickEvent: [WindowClickTest.py](https://gist.github.com/Johni0702/d55f9b42938e8d3a8a43) ([MiniPython](https://github.com/SpaceManiac/MiniPython))