[SPIGOT-2500] All player inventory report their InventoryType to be CRAFTING Created: 06/Jul/16 Updated: 11/Jul/16 |
|
Status: | Open |
Project: | Spigot |
Component/s: | None |
Affects Version/s: | None |
Fix Version/s: | None |
Type: | Bug | Priority: | Minor |
Reporter: | PixelPerfect | Assignee: | Unassigned |
Resolution: | Unresolved | Votes: | 2 |
Labels: | enum, inventory, inventoryclickevent | ||
Environment: |
git-Spigot-104c8c8-e43b278 (MC: 1.9) (Implementing API version 1.9-R0.1-SNAPSHOT) |
Plugin: | All. |
Description |
When getting the InventoryType of an item in a player's quick-bar, container, armor and offhand slots through the InventoryClickEvent event, a CRAFTING InventoryType is returned rather than the proper PLAYER enum. |
Comments |
Comment by PixelPerfect [ 11/Jul/16 ] |
Additionally, different areas of slots in the UI report to start at 0, meaning you can't safely ensure the correct slot is being clicked due to all areas reporting to be InventoryType:CRAFTING and say the first slot of the crafting grid, the crafting result slot and the first hotbar slot all reporting to be slot 0. |
Comment by PixelPerfect [ 11/Jul/16 ] |
I still feel that this is quite a big problem with the API regardless of if people have had to hack around it. |
Comment by md_5 [ 07/Jul/16 ] |
It's been this way for over four years (since the API was implemented in Minecraft 1.0.0). Changing it at this point could prove problematic. |
Comment by PseudoKnight [ 06/Jul/16 ] |
Confirmed on my server. (1.10.2) |
Comment by PixelPerfect [ 06/Jul/16 ] |
I have found that this bug does not appear when using the creative inventory. |