Interface IWorlds


public interface IWorlds
Provides access to game world information and world-hopping functionality.

This interface allows querying available worlds, checking world types, and performing world hops both in-game and from the login screen.

See Also:
  • World
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Closes the world selector on the login screen (lobby).
    List<net.runelite.api.World>
    getAll(Predicate<net.runelite.api.World> filter)
    Gets all worlds matching the specified filter.
    default net.runelite.api.World
    Gets the current world object.
    int
    Gets the ID of the current world.
    default net.runelite.api.World
    getFirst(int id)
    Gets a world by its ID.
    default net.runelite.api.World
    getFirst(Predicate<net.runelite.api.World> filter)
    Gets the first world matching the specified filter.
    net.runelite.api.World
    getRandom(Predicate<net.runelite.api.World> filter)
    Gets a random world matching the specified filter.
    void
    hopTo(net.runelite.api.World world)
    Initiates a world hop to the specified world.
    boolean
    Checks if the player is currently in a members (P2P) world.
    boolean
    isAllPkWorld(net.runelite.api.World world)
    Checks if the specified world is an all-PK world (Deadman or PvP world).
    boolean
    isBeta(net.runelite.api.World world)
    Checks if the specified world is a beta world.
    boolean
    isFreshStart(net.runelite.api.World world)
    Checks if the specified world is a Fresh Start world.
    boolean
    isHighRisk(net.runelite.api.World world)
    Checks if the specified world is a high-risk world.
    boolean
    Checks if the world switcher interface is currently open.
    boolean
    isLeague(net.runelite.api.World world)
    Checks if the specified world is a League (seasonal) world.
    boolean
    isMembers(net.runelite.api.World world)
    Checks if the specified world is a members (P2P) world.
    boolean
    isNormal(net.runelite.api.World world)
    Checks if the specified world is a normal world.
    boolean
    isPvpArena(net.runelite.api.World world)
    Checks if the specified world is a PvP Arena world.
    boolean
    isQuestSpeedRunning(net.runelite.api.World world)
    Checks if the specified world is a quest speedrunning world.
    boolean
    isSkillTotal(net.runelite.api.World world)
    Checks if the specified world has a total skill level requirement.
    boolean
    isSpeedrunning(net.runelite.api.World world)
    Checks if the specified world is a speedrunning world.
    boolean
    isTournament(net.runelite.api.World world)
    Checks if the specified world is a tournament world.
    void
    Loads the world list from the game server.
    void
    Opens the world hopper interface while logged in.
    void
    Opens 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

      List<net.runelite.api.World> getAll(Predicate<net.runelite.api.World> filter)
      Gets all worlds matching the specified filter.
      Parameters:
      filter - the predicate to filter worlds
      Returns:
      a list of worlds matching the filter
    • getFirst

      default net.runelite.api.World getFirst(Predicate<net.runelite.api.World> filter)
      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

      net.runelite.api.World getRandom(Predicate<net.runelite.api.World> filter)
      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).