Arnuh / ArmorEquipEvent

62 stars 43 forks source link

Bug, Event fired when looking in players inventories. #17

Open Zedify opened 5 years ago

Zedify commented 5 years ago

Since the InventoryClick listener only checks if its a player inventory and not who owns the inventory, you can use the /invsee command to look into someone's inventory and shift click items in and it will trigger the event

Zedify commented 5 years ago

I fixed it with this code btw if (!e.getWhoClicked().equals(e.getWhoClicked().getOpenInventory().getTopInventory().getHolder())) { return; }

Arnuh commented 5 years ago

Does the shift click go into the other players inventory or into the players armor inventory?

If it properly goes into the players armor inventory then that part is working as intended and the actual issue is getWhoClicked is not how we should be grabbing the player affected.

@Zedify