Interface IWorlds
This interface allows querying available worlds, checking world types, and performing world hops both in-game and from the login screen.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionvoidCloses the world selector on the login screen (lobby).List<net.runelite.api.World> Gets all worlds matching the specified filter.default net.runelite.api.WorldGets the current world object.intGets the ID of the current world.default net.runelite.api.WorldgetFirst(int id) Gets a world by its ID.default net.runelite.api.WorldGets the first world matching the specified filter.net.runelite.api.WorldGets a random world matching the specified filter.voidhopTo(net.runelite.api.World world) Initiates a world hop to the specified world.booleanChecks if the player is currently in a members (P2P) world.booleanisAllPkWorld(net.runelite.api.World world) Checks if the specified world is an all-PK world (Deadman or PvP world).booleanisBeta(net.runelite.api.World world) Checks if the specified world is a beta world.booleanisFreshStart(net.runelite.api.World world) Checks if the specified world is a Fresh Start world.booleanisHighRisk(net.runelite.api.World world) Checks if the specified world is a high-risk world.booleanChecks if the world switcher interface is currently open.booleanisLeague(net.runelite.api.World world) Checks if the specified world is a League (seasonal) world.booleanisMembers(net.runelite.api.World world) Checks if the specified world is a members (P2P) world.booleanisNormal(net.runelite.api.World world) Checks if the specified world is a normal world.booleanisPvpArena(net.runelite.api.World world) Checks if the specified world is a PvP Arena world.booleanisQuestSpeedRunning(net.runelite.api.World world) Checks if the specified world is a quest speedrunning world.booleanisSkillTotal(net.runelite.api.World world) Checks if the specified world has a total skill level requirement.booleanisSpeedrunning(net.runelite.api.World world) Checks if the specified world is a speedrunning world.booleanisTournament(net.runelite.api.World world) Checks if the specified world is a tournament world.voidLoads the world list from the game server.voidOpens the world hopper interface while logged in.voidOpens the world selector on the login screen (lobby).
-
Method Details
-
inMembersWorld
boolean inMembersWorld()Checks if the player is currently in a members (P2P) world.- Returns:
- true if in a members world, false if in a free-to-play world
-
getAll
Gets all worlds matching the specified filter.- Parameters:
filter- the predicate to filter worlds- Returns:
- a list of worlds matching the filter
-
getFirst
Gets the first world matching the specified filter.- Parameters:
filter- the predicate to filter worlds- Returns:
- the first matching world, or null if none found
-
getFirst
default net.runelite.api.World getFirst(int id) Gets a world by its ID.- Parameters:
id- the world ID (e.g., 301, 302, etc.)- Returns:
- the world with the specified ID, or null if not found
-
getRandom
Gets a random world matching the specified filter.Useful for selecting a random world to hop to when any matching world is acceptable.
- Parameters:
filter- the predicate to filter worlds- Returns:
- a random matching world, or null if none found
-
getCurrentId
int getCurrentId()Gets the ID of the current world.- Returns:
- the current world ID
-
getCurrent
default net.runelite.api.World getCurrent()Gets the current world object.- Returns:
- the current world, or null if not found
-
isHopperOpen
boolean isHopperOpen()Checks if the world switcher interface is currently open.- Returns:
- true if the world hopper is open, false otherwise
-
hopTo
void hopTo(net.runelite.api.World world) Initiates a world hop to the specified world.This method will automatically open the world hopper if not already open and handle any confirmation dialogs.
- Parameters:
world- the world to hop to
-
openHopper
void openHopper()Opens the world hopper interface while logged in. -
isMembers
boolean isMembers(net.runelite.api.World world) Checks if the specified world is a members (P2P) world.- Parameters:
world- the world to check- Returns:
- true if the world is members-only, false otherwise
-
isAllPkWorld
boolean isAllPkWorld(net.runelite.api.World world) Checks if the specified world is an all-PK world (Deadman or PvP world).In these worlds, players can attack each other anywhere.
- Parameters:
world- the world to check- Returns:
- true if the world is a Deadman or PvP world, false otherwise
-
isSkillTotal
boolean isSkillTotal(net.runelite.api.World world) Checks if the specified world has a total skill level requirement.- Parameters:
world- the world to check- Returns:
- true if the world requires a minimum total level, false otherwise
-
isTournament
boolean isTournament(net.runelite.api.World world) Checks if the specified world is a tournament world.Tournament worlds are used for competitive events and may have different rules than normal worlds.
- Parameters:
world- the world to check- Returns:
- true if the world is a tournament world, false otherwise
-
isSpeedrunning
boolean isSpeedrunning(net.runelite.api.World world) Checks if the specified world is a speedrunning world.- Parameters:
world- the world to check- Returns:
- true if the world is a speedrunning world, false otherwise
-
isFreshStart
boolean isFreshStart(net.runelite.api.World world) Checks if the specified world is a Fresh Start world.Fresh Start worlds are periodic events with economy resets.
- Parameters:
world- the world to check- Returns:
- true if the world is a Fresh Start world, false otherwise
-
isLeague
boolean isLeague(net.runelite.api.World world) Checks if the specified world is a League (seasonal) world.- Parameters:
world- the world to check- Returns:
- true if the world is a League world, false otherwise
-
isNormal
boolean isNormal(net.runelite.api.World world) Checks if the specified world is a normal world.A normal world has no special restrictions or game modes. It is not a PK world, skill total world, tournament world, league world, PvP arena, speedrunning, fresh start, quest speedrunning, beta, or high risk world.
- Parameters:
world- the world to check- Returns:
- true if the world is a normal world, false otherwise
-
isPvpArena
boolean isPvpArena(net.runelite.api.World world) Checks if the specified world is a PvP Arena world.- Parameters:
world- the world to check- Returns:
- true if the world is a PvP Arena world, false otherwise
-
isQuestSpeedRunning
boolean isQuestSpeedRunning(net.runelite.api.World world) Checks if the specified world is a quest speedrunning world.- Parameters:
world- the world to check- Returns:
- true if the world is a quest speedrunning world, false otherwise
-
isBeta
boolean isBeta(net.runelite.api.World world) Checks if the specified world is a beta world.- Parameters:
world- the world to check- Returns:
- true if the world is a beta world, false otherwise
-
isHighRisk
boolean isHighRisk(net.runelite.api.World world) Checks if the specified world is a high-risk world.In high-risk worlds, the Protect Item prayer has no effect.
- Parameters:
world- the world to check- Returns:
- true if the world is a high-risk world, false otherwise
-
loadWorlds
void loadWorlds()Loads the world list from the game server.If on the login screen, this will open and close the lobby world selector. If logged in, this will open the world hopper interface.
-
openLobbyWorlds
void openLobbyWorlds()Opens the world selector on the login screen (lobby). -
closeLobbyWorlds
void closeLobbyWorlds()Closes the world selector on the login screen (lobby).
-