Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static RS2Widget getWidgetByAction(MethodProvider script, String action) {
- for (RS2Widget w : script.getWidgets().getAll()) {
- if (w != null && w.isVisible()) {
- String[] actions = w.getInteractActions();
- if (actions != null)
- for (String a : actions)
- if (a != null)
- if (a.contains(action))
- return w;
- }
- }
- return null;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement