Class WorldMap

java.lang.Object
net.storm.sdk.game.WorldMap

public class WorldMap extends Object
Provides static utility methods for interacting with the in-game world map. This class allows querying information about the world map interface, such as the current mouse location on the map.

All methods in this class are static and delegate to the underlying IWorldMap implementation.

Example usage:


 // Get the world point the mouse is hovering over on the map
 WorldPoint mapLocation = WorldMap.getMouseLocation();
 if (mapLocation != null) {
     System.out.println("Mouse is over: " + mapLocation);
     System.out.println("X: " + mapLocation.getX() + ", Y: " + mapLocation.getY());
 }
 
See Also:
  • WorldPoint
  • Constructor Details

    • WorldMap

      public WorldMap()
  • Method Details

    • getMouseLocation

      public static net.runelite.api.coords.WorldPoint getMouseLocation()
      Gets the world point corresponding to the current mouse position on the world map. This returns the game world coordinates that the mouse cursor is hovering over when the world map interface is open.
      Returns:
      the WorldPoint at the mouse location, or null if the map is not open or the mouse is not over the map