Bug, Event fired when looking in players inventories.
Zedify opened this issue · comments
Zedify commented
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
I fixed it with this code btw
if (!e.getWhoClicked().equals(e.getWhoClicked().getOpenInventory().getTopInventory().getHolder())) {
return;
}
Arnah commented
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.