Menu Entries
com.n3plugins.sdk.menu exposes the client's current menu entries as immutable
snapshots for diagnostics and failed-action inspection. Action matching and
one-based action-index resolution remain documented on
Action Resolver.
Caution
Do not dispatch actions directly from MenuEntrySnapshot values. Use
InteractionApi.actions.* and ActionResolver for action execution and keep
this page's APIs for inspection.
MenuEntriesApi
List<MenuEntrySnapshot> entries = MenuEntriesApi.entries();
Optional<MenuEntrySnapshot> bank = MenuEntriesApi.firstMatching("Bank", "Banker");
boolean hasTakeCoins = MenuEntriesApi.contains("Take", "Coins");
log.debug("Current menu entries: {}", MenuEntriesApi.diagnostics());
Methods:
entries()- captures currentclient.getMenuEntries()values as an immutable list ofMenuEntrySnapshots. Null client or null menu entries return an empty list.firstMatching(option, target)- returns the first entry whose normalized option and target match case-insensitively. Passnullfor either argument to ignore that side.contains(option, target)- true whenfirstMatching(...)finds a match.diagnostics()- formats current entries asoption -> targetpairs joined by semicolons for logs and failure messages.
MenuEntrySnapshot
MenuEntrySnapshot normalizes text by removing RuneLite tags and trimming
whitespace at capture time. It stores:
getOption()getTarget()getIdentifier()getType()getParam0()getParam1()getItemId()getWorldViewId()isDeprioritized()matches(option, target)
Snapshots are useful when an InteractionResult reports
ACTION_NOT_FOUND and you need to see what the client actually offered on the
menu. They are not a replacement for the result-aware action classes.