Class TradeVerb
java.lang.Object
privbot.hooks.shop.TradeVerb
Resolves which action to click in order to open a shop.
Servers label this inconsistently — Trade, Shop, Shop-with,
Buy. When the user leaves the interaction field blank we pick from the entity's live
action list by preference order. When the user supplies an override we honour it verbatim, but
still match it against what the entity actually exposes so a typo produces a readable failure
instead of a dispatch that silently does nothing.
-
Method Summary
Modifier and TypeMethodDescriptioncandidates(String override) Ordered verbs to try when the entity's action list cannot be read directly — game objects are resolved by asking the object helper for each candidate in turn.static StringLowercases and turns hyphens/underscores into spaces, collapsing runs of whitespace, so"Shop-with","Shop with"and"SHOP_WITH"all compare equal.static String
-
Method Details
-
normalize
-
resolve
-
candidates
Ordered verbs to try when the entity's action list cannot be read directly — game objects are resolved by asking the object helper for each candidate in turn.- Returns:
- a single-element list holding the override when set, else the full preference order
-