Advertisement
Guest User

Untitled

a guest
Aug 19th, 2019
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. public static RS2Widget getWidgetByAction(MethodProvider script, String action) {
  2.  
  3. for (RS2Widget w : script.getWidgets().getAll()) {
  4. if (w != null && w.isVisible()) {
  5. String[] actions = w.getInteractActions();
  6. if (actions != null)
  7. for (String a : actions)
  8. if (a != null)
  9. if (a.contains(action))
  10. return w;
  11. }
  12. }
  13.  
  14. return null;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement