Search in sources :

Example 1 with PostItemComposition

use of net.runelite.api.events.PostItemComposition in project runelite by runelite.

the class Hooks method postItemComposition.

public static void postItemComposition(ItemComposition itemComposition) {
    PostItemComposition event = new PostItemComposition();
    event.setItemComposition(itemComposition);
    eventBus.post(event);
}
Also used : PostItemComposition(net.runelite.api.events.PostItemComposition)

Example 2 with PostItemComposition

use of net.runelite.api.events.PostItemComposition in project runelite by runelite.

the class MenuEntrySwapperPlugin method onPostItemComposition.

@Subscribe
public void onPostItemComposition(PostItemComposition event) {
    ItemComposition itemComposition = event.getItemComposition();
    Integer option = getSwapConfig(itemComposition.getId());
    if (option != null) {
        itemComposition.setShiftClickActionIndex(option);
        // Update our cached item composition too
        ItemComposition ourItemComposition = itemManager.getItemComposition(itemComposition.getId());
        ourItemComposition.setShiftClickActionIndex(option);
    }
}
Also used : ItemComposition(net.runelite.api.ItemComposition) PostItemComposition(net.runelite.api.events.PostItemComposition) Subscribe(com.google.common.eventbus.Subscribe)

Aggregations

PostItemComposition (net.runelite.api.events.PostItemComposition)2 Subscribe (com.google.common.eventbus.Subscribe)1 ItemComposition (net.runelite.api.ItemComposition)1