October 7, 20214 yr Hey guys, I'm trying to hop worlds in my script, and I'm having a little bit of difficulty understanding the Worlds methods. In specific, I'm confused about the parameter "all" for the method getAvailableWorlds public java.util.List<World> getAvailableWorlds(boolean all) Gets a list with all available worlds to hop to Parameters: all - True for all worlds, False to filter out worlds that are not allowed to be hopped to What is it that all does? If I wanted to just get a list of all P2P, non PVP worlds what would I input? Thanks in advance
October 8, 20214 yr I don't know if the API supports what you're wanting. May need to make your own list of worlds and keep them updated, but test it out and find out what "not allowed to be hopped" entails to.
October 8, 20214 yr 3 hours ago, ThoughtVNC said: Hey guys, I'm trying to hop worlds in my script, and I'm having a little bit of difficulty understanding the Worlds methods. In specific, I'm confused about the parameter "all" for the method getAvailableWorlds public java.util.List<World> getAvailableWorlds(boolean all) Gets a list with all available worlds to hop to Parameters: all - True for all worlds, False to filter out worlds that are not allowed to be hopped to What is it that all does? If I wanted to just get a list of all P2P, non PVP worlds what would I input? Thanks in advance all - True for a List all worlds, False to filter out worlds that are not allowed to be hopped to based on osbots criteria of a invalid world (pvp, high-risk, etc.) List<World> w = getWorlds().getAvailableWorlds(true); want to filter? List<World> w = getWorlds().getAvailableWorlds(true).stream().filter(world -> world.isMembers() && world.isPvp()).collect(Collectors.toList());
October 8, 20214 yr Author 1 hour ago, Chris said: all - True for a List all worlds, False to filter out worlds that are not allowed to be hopped to based on osbots criteria of a invalid world (pvp, high-risk, etc.) List<World> w = getWorlds().getAvailableWorlds(true); want to filter? List<World> w = getWorlds().getAvailableWorlds(true).stream().filter(world -> world.isMembers() && world.isPvp()).collect(Collectors.toList()); Thanks, I appreciate it.
Create an account or sign in to comment