api: pass menu entry to menu clicked event and forward accessors
This commit is contained in:
@@ -286,7 +286,7 @@ public class CannonPlugin extends Plugin
|
||||
// Check if cannonballs are being used on the cannon
|
||||
if (event.getMenuAction() == MenuAction.ITEM_USE_ON_GAME_OBJECT)
|
||||
{
|
||||
final int idx = event.getSelectedItemIndex();
|
||||
final int idx = client.getSelectedItemIndex();
|
||||
final ItemContainer items = client.getItemContainer(InventoryID.INVENTORY);
|
||||
if (items == null)
|
||||
{
|
||||
|
||||
@@ -703,7 +703,7 @@ public class GroundItemsPlugin extends Plugin
|
||||
return;
|
||||
}
|
||||
|
||||
final Item clickedItem = inventory.getItem(menuOptionClicked.getSelectedItemIndex());
|
||||
final Item clickedItem = inventory.getItem(client.getSelectedItemIndex());
|
||||
if (clickedItem == null)
|
||||
{
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user