use of net.runelite.api.events.PlayerMenuOptionsChanged in project runelite by runelite.
the class RSClientMixin method playerOptionsChanged.
@FieldHook("playerOptions")
@Inject
public static void playerOptionsChanged(int idx) {
// Reset the menu type
MenuAction[] playerActions = { PLAYER_FIRST_OPTION, PLAYER_SECOND_OPTION, PLAYER_THIRD_OPTION, PLAYER_FOURTH_OPTION, PLAYER_FIFTH_OPTION, PLAYER_SIXTH_OPTION, PLAYER_SEVENTH_OPTION, PLAYER_EIGTH_OPTION };
if (idx >= 0 && idx < playerActions.length) {
MenuAction playerAction = playerActions[idx];
client.getPlayerMenuTypes()[idx] = playerAction.getId();
}
PlayerMenuOptionsChanged optionsChanged = new PlayerMenuOptionsChanged();
optionsChanged.setIndex(idx);
eventBus.post(optionsChanged);
}
Aggregations