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);
}
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);
}
}
Aggregations