You could make a list of worlds yourself.
Here is a snippet of what you could do (Nothing in here has to be static).
public static ArrayList<Integer> worlds = new ArrayList<Integer>();
public static ArrayList<Integer> blockedWorlds = new ArrayList<Integer>();
@Override
public void onStart() throws InterruptedException {
blockWorlds();
getWorlds().getAvailableWorlds(false).forEach(w -> {
if (!w.isMembers() && !w.isPvpWorld() && !blockedWorlds.contains(w.getId()) && getWorlds().isWorldAllowedForHop(w)) {
worlds.add(w.getId());
}
});
log(worlds.size() + " worlds added to hop list.");
}
//To block worlds you just add to the array of integers called b
static int[] b = {318, 400, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 443, 462, 463, 512, 535, 536};
public static void blockWorlds() {
for (int i : b) {
blockedWorlds.add(i);
}
}
Then you could make a custom method to get a random world etc.
Not quite sure which worlds are blocked here, but it blocks league worlds (So they won't be added to worlds arraylist)