World SDK
This page documents the committed source. Treat revision-sensitive RuneLite UI, packet, or in-game outcomes as pending live-client verification unless the page records direct evidence.
com.n3plugins.sdk.world owns read-side world and world-map reference material. Use it when a plugin needs current-world state, loaded world-list snapshots, or coordinate conversions. World hopping writes stay in WorldActions.
This page covers reads only. Opening the hopper, loading worlds, and hopping are result-aware action operations documented on World Actions.
WorldsApi
WorldsApi reads the current world id, current world flags, and loaded RuneLite world-list entries.
Optional<Integer> currentWorld = WorldsApi.currentWorldId();
List<WorldSnapshot> members = WorldsApi.worlds().stream()
.filter(world -> world.hasType(WorldType.MEMBERS))
.collect(Collectors.toList());
Optional<WorldSnapshot> world302 = WorldsApi.find(302);
Optional<WorldSnapshot> current = WorldsApi.current();
Methods:
currentWorldId()- current world id, or empty when the client is unavailable or does not expose a positive world id.currentWorldTypes()- immutable current world type flags fromclient.getWorldType(), or an empty list when unavailable.worlds()- immutableWorldSnapshotlist fromclient.getWorldList(), or empty before the world list is loaded.find(worldId)- matchingWorldSnapshotfrom the loaded list.current()- current world's loadedWorldSnapshot, if both the current id and world list entry are available.currentWorldHasType(type)- true when the current world type list contains the requestedWorldType.
WorldSnapshot
WorldSnapshot is an immutable copy of a RuneLite World list entry. It contains:
getId()getPlayerCount()getLocation()getIndex()getActivity()getAddress()getTypes()hasType(type)isCurrent()
getTypes() returns a defensive EnumSet copy. isCurrent() is set by comparing the entry id to the current client world id at snapshot time.
WorldMapApi
WorldMapApi reads world-map state and performs current-client coordinate conversions.
boolean open = WorldMapApi.isOpen();
Optional<Point> center = WorldMapApi.mapPosition();
Optional<Float> zoom = WorldMapApi.zoom();
Optional<LocalPoint> local = WorldMapApi.toLocal(worldPoint);
Optional<WorldPoint> world = WorldMapApi.toWorld(localPoint);
Methods:
isOpen()- checks whether the world-map view widget is visible.mapPosition()- current world-map center position from RuneLite'sWorldMap, when available.zoom()- current world-map zoom from RuneLite'sWorldMap, when available.toLocal(worldPoint)- converts a world tile to a sceneLocalPoint, or empty when the client is unavailable, the point is null, or the tile is outside the current scene.toWorld(localPoint)- converts a local point to a top-level world tile, or empty when the client or point is unavailable.
These helpers log state and convert coordinates only. They do not add menu entries, start walking, open the map, or hop worlds.