Without spoonfeeding too much, here are a couple snippets that you'll have to assemble yourself
// currently selected minigame, do getMessage() on this
Optional<RS2Widget> firstAttempt = getWidgets().getAll().stream().filter(a -> a.getRootId() == 76 && a.getMessage() != null
&& a.getMessage().length() > 0 && a.getTextColor() == 16750623 && a.getHeight() < 20).findFirst();
// teleport button (after a minigame is selected)
Optional<RS2Widget> teleportButton = getWidgets().getAll().stream().filter(a -> a.getMessage().length() > 0 && a.getMessage().equalsIgnoreCase("Teleport")).findFirst();
// is minigame teleport panel shown
boolean isTab = getConfigs().get(1054) >= 3000;
// open grouping tab
getWidgets().interact(548, 39, "Grouping");
// click on correct minigame
Optional<RS2Widget> targetMinigameOption = getWidgets().getAll().stream()
.filter(a -> a.getRootId() == 76 && a.getMessage().length() > 0
&& a.getMessage().equalsIgnoreCase("MINIGAME NAME HERE"))
.findFirst();