SDK reference
Everything your plugin can call. The code check on your upload allows this list, your own classes and plain Java. Anything else is stopped, even if it builds on your computer.
Find a method by task
- Run code every game tick
Subscribe - Check that the game is ready
GameAPI.isLoggedIn() - Find the nearest NPC by name
NpcQuery.withName(…) - Talk to an NPC or attack it
NpcAPI.interact(…) - Click an object such as a door or tree
TileObjectAPI.interact(…) - Walk to a tile
MovementAPI.walkToWorldPoint(…) - Open the bank
BankAPI.requestOpen() - Withdraw from the bank
BankAPI.requestWithdraw(…) - Eat, drop or use an inventory item
InventoryAPI.interact(ItemEx, String) - Count items in your inventory
InventoryAPI.count(int...) - Continue dialogue or pick an option
DialogueAPI.selectOption(…) - Write a line to the Log tab
Logger.info(String) - Write a loop that can wait
VitaPlugin.loop() - Wait a game tick inside loop()
Delays.tick(int) - Turn a prayer on
PrayerAPI.turnOn() - Cast a spell
MagicAPI.cast(Spell, NpcEx) - Equip an item
EquipmentAPI.equip(String) - Read a skill level
SkillAPI.getBoostedLevel(…) - Pick up an item from the ground
TileItemAPI.interact(TileItemEx, String) - Check whether a quest is done
QuestAPI.isCompleted(…) - Hop to another world
WorldsAPI.requestHop(…) - Add settings the player can change
ConfigGroup - React when a setting changes
PluginConfigChanged - Draw an overlay over the game
OverlayPanel - Add a side panel
PluginPanel - Add a hotkey
Hotkeys.register(Supplier, Runnable) - Save data in a file
PluginStorage.writeJson(…) - Post to a Discord webhook
DiscordWebhook.send(String)
How calls work
Most of the API is static: call it on the class, as in GameAPI.isLoggedIn(). The objects it gives you, such as NpcEx and ItemEx, have their own methods: PlayerEx.getLocal().getWorldPoint().
Do your work in a Subscribe method for GameTick, which runs every 0.6 seconds. Methods that click send one action and return at once. Read the result on a later tick instead of waiting in a loop.
Or extend VitaPlugin instead of Plugin and put your code in VitaPlugin.loop(). The client starts it at every game tick on a worker thread, so it may wait: Delays and the other helpers in com.tonic.api.threaded work there. Never wait in a @Subscribe method; that runs on the game thread and freezes the game.
Methods that look something up return null when nothing matches. Check for null before you use the result.
Browse the API
Open a package to see its classes. Or press the search box and type a name.
RLPlugins API
com.tonic.api.combatCombat timing, freezes, targets and safe spots.14
- AttackTimerImmutable attack-cooldown snapshot for one side of the current combat focus.
- CombatAttackStyleHigh-level combat style inferred from animations and combat context.
- CombatSnapshotImmutable combined combat timing snapshot.
- CombatTargetPlain snapshot of the player currently selected as the combat focus.
- CombatTimingAPIEvent-driven player-versus-player combat timing API.
- FreezeStateImmutable freeze and freeze-immunity state for the local player and target.
- FreezeState.FreezeStateTypeCoarse freeze relationship between local player and tracked target.
- PidPriorityPlayer ID priority inferred from attack-animation and hitsplat timing.
- PidStatusImmutable PID priority snapshot for the current combat target.
- SafespotAPIPvP safespot API based on the local PK API rules.
- SafespotOptionsImmutable options for PvP safespot queries.
- SafespotPlanImmutable PvP safespot snapshot for the focused player target.
- SafespotResultResult of a PvP safespot query.
- SafespotResult.StatusPvP safespot query status.
com.tonic.api.configChanges to settings, without their values.1
com.tonic.api.entitiesFind NPCs, players, objects, ground items and projectiles and click them.8
- ActorAPIThe parent class of NpcAPI.
- FollowerAPIThe local player's actual follower and its equipment-tab call action.
- GraphicsObjectAPINative entry point for graphics-object creation events.
- NpcAPIFind NPCs and interact with them.
- PlayerAPIPlayer API.
- ProjectileAPIClient-thread projectile reads that return values instead of live projectile references.
- TileItemAPITileItem API.
- TileObjectAPIFind objects such as trees, rocks, doors and bank booths, and click them.
com.tonic.api.gameGame state, skills, quests, worlds, the camera and walking.32
- AnticipationAPIScript-facing speculative preparation.
- CameraAPICamera API for programmatic camera control.
- ClientScriptAPIClientScript API.
- ClueScrollAPIRuneLite clue recognition and data through its public integration points.
- CombatAPIYour combat state: health, special attack, poison, attack style and retaliate.
- GameAPICheck the state of the game before your plugin acts.
- HouseAPIPOH API.
- HouseOptionsAPIYour house settings: building mode and where teleports arrive.
- ItemDefinitionAPIItem-definition reads for native editors, including items absent from the tradeable catalog.
- ItemSpawnAPIStatic item spawn lookup and basic pickup routing.
- LoginAPIThe login screen: read its state, press Play and dismiss the disconnect message.
- MovementAPIWalk to a tile, and read run energy, run and stamina.
- QuestAPIQuest API.
- QuestHelperAPIReads the Quest Helper plugin: its current step, requirements and highlights.
- SafespotAPIDeterministic NPC safespot solving.
- SceneAPIScene API.
- SceneRenderAPINative scene rendering controls with explicit plugin lifecycle ownership.
- SceneRenderAPI.ObjectVisibilityThe renderer also calls this on the map-loader thread: the filter is immutable.
- SceneRenderAPI.RegistrationUndoes a SceneRenderAPI change when you close it.
- SceneRenderAPI.VisibilityFilterReturning false hides only the supplied renderable; unhandled types remain visible.
- SceneRenderAPI.WallRecolorRestores the exact first face-color array whenever its model changes or the token closes.
- SettingsMigrationCopies shared settings before the new runtime reads them; existing clients keep their keys.
- ShortestPathAPIRead-only integration with the optional Shortest Path plugin's current route.
- SkillAPISkill API.
- TickManipulationAPIShared inventory combinations for tick manipulation; the plugin owns skill timing.
- UiVisibilityAPIHost-wide visibility state; consumers pause automatic tasks without cancelling menu cycles.
- UiVisibilityAPI.StateOne listener per shared host, independent of which managed plugins are enabled.
- UiVisibilityChangedClient-thread notification for native plugin presentation changes.
- VarAPIVarbit and Varp related API.
- WalkerAPIWalks to any tile in the game with the same walker our own plugins use.
- WildernessAPIRead-only normal-world Wilderness planning, including the fixed KBD entrance basement/public lair, Deep Wilderness Dungeon and fixed Revenant Caves.
- WorldsAPIThe current world and world hopping that does not wait.
com.tonic.api.game.sailingSailing: your boat, notice boards and courier tasks.8
- BoatStatsAPIAPI for retrieving boat statistics in sailing.
- HeadingBoat Heading Enum.
- MoveModeBoat Move Mode Enum.
- NoticeBoardAPIAPI for interacting with the Sailing Notice Board.
- NoticeBoardAPI.NoticeBoardQueryA search over the tasks on a sailing notice board.
- SailingAPISailing API.
- SailingRenderUtilStatic utility class for rendering boat hull overlays.
- SailingTabSailing Side Panel Tabs Enum.
com.tonic.api.handlersStep-by-step builders for banking, trading, dialogue and other common sequences.12
- BankBuilderA handler builder for banking actions.
- BankBuilder.BankItemRepresents an item in the bank/bank inv with its ID and amount.
- DialogueBuilderA builder for handling in-game dialogues.
- GenericHandlerBuilderBuilder for creating generic, custom handlers.
- GrandExchangeHandlerHandler builder for interacting with the Grand Exchange.
- InventoryBuilderBuilder for creating inventory-related handlers.
- NpcBuilderA builder for creating NPC interaction handlers.
- PlayerBuilderBuilder for handling player interactions.
- TileItemBuilderBuilder for handling interactions with tile items.
- TileObjectBuilderBuilder for handling interactions with tile objects in the game world.
- TradeBuilderBuilder for handling player trades.
- TradeBuilder.TradeItemRepresents an item involved in a trade, including its ID and amount.
com.tonic.api.hotkeysHotkeys the player picks in your plugin's settings.2
com.tonic.api.inputKeyboard input to the game: press keys and type text as the player.3
com.tonic.api.loadoutsInventory, equipment and bank setups: save them, check them and withdraw them.11
- BankProfileShared bank restoration profile, with an independent embedded equipment selection.
- BankProfile.BuilderBuilds a BankProfile.
- BankProfileStoreAccount-scoped bank profiles; independent of the Gear plugin and its profile store.
- EquipmentLoadoutA high-level loadout API designed for use in conjunction with equipment.
- EquipmentProfileA named equipment selection shared by native plugins.
- EquipmentProfile.BuilderBuilds an EquipmentProfile.
- EquipmentProfileStorePersistent shared equipment profiles, independent of any consuming plugin's lifecycle.
- InventoryLoadoutA high-level loadout API designed for use in conjunction with banking and resupplying.
- InventoryProfileImmutable inventory layout, quantities and bank withdrawal preferences.
- InventoryProfile.BuilderBuilds an InventoryProfile.
- LoadoutExceptionThrown when a loadout cannot be built or withdrawn.
com.tonic.api.loadouts.itemItems in a loadout, by id or name.7
- IdLoadoutItemA loadout item matched by item ids.
- IdLoadoutItem.BuilderBuilds an IdLoadoutItem.
- ItemDepletionListenerCalled when a loadout item runs out.
- LoadoutItems you want carried, worn or banked, and whether you have them.
- LoadoutItemOne item of a loadout: how many, where, and whether it is optional.
- NamedLoadoutItemA loadout item matched by item names.
- NamedLoadoutItem.BuilderBuilds a NamedLoadoutItem.
com.tonic.api.loadouts.item.restockRestock rules for loadout items.2
com.tonic.api.storageFiles for your plugin: text, bytes and JSON in a folder only your plugin can open.2
com.tonic.api.threadedHelpers that wait, such as Delays and the Grand Exchange buyer. Call them only from VitaPlugin.loop().9
- CannonCannon class for placing and managing Dwarf multicannon.
- DelaysWaits for game ticks or for a condition.
- DialogueNodeA class that represents a dialogue tree node structure for conversational paths.
- DialoguesThreaded dialogue related automation.
- GrandExchangeThreaded Grand Exchange API.
- MinigamesThreaded Minigames API.
- Minigames.DestinationEvery minigame teleport destination.
- TimerSmall elapsed-time timer utility for script flow checks.
- WorldsAPIWorld hopping that waits until the hop is done. Call it only from VitaPlugin.loop().
com.tonic.api.webhookPost text and embeds to a Discord webhook, for example a loot channel.3
- DiscordWebhookPosts messages from your plugin to a Discord webhook, for example a loot or level-up channel.
- WebhookEmbedA box in a Discord message with a title, text, a coloured edge, fields and pictures.
- WebhookMessageOne message for a DiscordWebhook: text, up to 10 embeds, and the name and picture it is posted under.
com.tonic.api.widgetsInterfaces: bank, inventory, equipment, prayer, magic, shops, Grand Exchange, trade and more.36
- BankAPIOpen the bank, see what is in it, withdraw, deposit and close it.
- DepositBoxAPIDeposit Box API.
- DialogueAPIRead NPC chat, continue it and pick options.
- EmoteAPIEmote automation api.
- EquipmentAPIEquip, unequip and read the items you wear.
- GrandExchangeAPIGrand Exchange offers: buy, sell, collect and read the slots.
- InventoryAPIRead your 28 inventory slots and use the items in them.
- MagicAPIMagicAPI provides utility methods for managing magic-related functionalities, including autocasting spells and handling home teleport cooldowns.
- MakeXAPIAn API designed to interact with the creation/make-X interface.
- MiniMapAPIMiniMap API.
- PrayerAPIPrayerAPI provides methods to interact with and manage prayers in the game.
- PrayerAPI.ModeHow PrayerAPI.manage keeps prayers on: normal, lazy flick, flick or off.
- PvpArenaBuildPvP Arena character builds.
- PvpArenaLoadoutExact PvP Arena build specification.
- PvpArenaLoadout.BuilderBuilds a PvP Arena loadout.
- PvpArenaLoadoutAPIPvP Arena build inventory and worn-equipment editor.
- PvpArenaLoadoutSetupTick-owned, exact PvP Arena loadout setup session.
- PvpArenaLoadoutSetup.StageSteps of setting up your PvP Arena loadout.
- PvpArenaLoadoutSnapshotOne client-thread-owned, immutable PvP Arena loadout observation.
- PvpArenaLoadoutSnapshot.StateWhether a PvP Arena loadout snapshot is ready.
- PvpArenaOpponentLoadoutSetupTick-owned opponent mirror session for an open unranked PvP Arena duel.
- PvpArenaOpponentLoadoutSetup.StageSteps of copying your opponent's PvP Arena loadout.
- PvpArenaOpponentSpellbookSyncTick-owned spellbook synchronization for an open unranked PvP Arena duel.
- PvpArenaOpponentSpellbookSync.StageSteps of matching your opponent's spellbook in the PvP Arena.
- PvpArenaSpellbookSpellbooks supported by the PvP Arena loadout editor.
- QuiverAPINative Dizana's quiver storage and removal actions.
- ShopAPIShopAPI - methods for interacting with shops.
- SlayerRewardsAPIThe slayer reward shop: your points and its tabs.
- SmithingAPIAPI for interacting with the OSRS Smithing interface.
- TabsAPIAPI for interacting with game tabs.
- TanningAPIAPI for interacting with the Tanner interface.
- TanningAPI.LeatherTypeEnum representing the different leather types available at the tanner.
- TanningAPI.TanningSlotEnum representing the tanning slots in the interface.
- TradeAPITrade with other players: offer items, accept and read both sides.
- WidgetAPIWidget API.
- WorldMapAPIA utility class providing methods to interact with the floating world map in RuneLite.
com.tonic.dataGame data: equipment slots, tabs, emotes, shops, locations and more.25
- AccountTypeEnumeration representing the different account types in the game.
- AttackStyleThe attack style slots of the combat tab, and spell casting.
- EmoteIDEvery emote. Call perform() to play one.
- EquipmentSlotAn enumeration of equipment slots in the inventory.
- GrandExchangeSlotThe eight Grand Exchange offer slots.
- ItemConstantsItem id constants the API uses.
- ItemDefinitionImmutable item metadata for native editors; contains no client-owned definition object.
- ItemSpawnStatic item spawn metadata loaded from spawn_items.json.
- LayoutViewParts of the game screen and whether they show in the current layout.
- ObjectBlockAccessFlagsBit flags for the sides of an object that block movement.
- OrientationThe eight directions an object or actor can face.
- QuiverAmmoImmutable snapshot of the ammunition stored in a quiver.
- RegionInfoNamed map regions: bosses, cities, dungeons, minigames and raids.
- RegionInfo.AreaTypeKinds of named region.
- SafespotA solved combat safespot and its deterministic movement plan.
- SailingConstantsSailing ids and constants.
- StrongholdSecurityQuestionAnswers to the Stronghold of Security questions.
- TabThe side panel tabs. Open one with TabsAPI.open.
- VarrockMuseumAnswerAnswers to the Varrock Museum quiz.
- WallsWhich sides of a tile have walls.
- Walls.WallOne side of a tile.
- WeaponCombatStylesKnown weapon combat families.
- WidgetInfoExtendedThe WidgetInfoExtended type.
- WorldLocationNamed places in the world and their areas.
- WorldLocation.LocationThe corners of a WorldLocation's area.
com.tonic.data.locatablesKnown NPC and object locations.3
com.tonic.data.locatables.sailingSailing ports, routes and courier data.9
- BoatBoardingAPIBoard a boat you used recently.
- CargoHoldAPIYour boat's cargo hold: see what is in it and withdraw crates.
- CargoHoldAPI.CargoItemOne item in the cargo hold.
- CourierTaskDataEvery sailing courier task: cargo, pickup and delivery.
- NoticeBoardPostingThe postings on a port's sailing notice board.
- PortLocationEvery sailing port.
- PortPathsSailing routes between ports.
- PortTaskTriggerVarbits that track the courier task slots.
- PortTaskTrigger.TaskTypeWhat a courier task varbit tracks.
com.tonic.data.magicSpells, runes, staves and the rune pouch.9
- MagicCastWhether you can cast a spell, per spellbook.
- RuneEvery rune, with the item ids that count as it.
- RunePouchRune pouches: see and change what they hold.
- RunePouchRuneRunes as a rune pouch stores them.
- RuneRequirementRunes a spell needs, and whether you have them.
- SpellA spell from any spellbook. Cast it with MagicAPI.cast or with its own methods.
- SpellBookThe spellbooks, and which one you are on.
- StaffStaves that count as unlimited runes.
- TomeTomes that count as unlimited runes.
com.tonic.data.magic.spellbooksEvery spell of every spellbook. Pass one to MagicAPI.cast.4
com.tonic.data.runecraftingEssence pouches.2
com.tonic.data.slayerrewardsSlayer reward shop entries.7
- AbstractTabImplBase of the slayer reward shop tabs.
- BuyTabThe Buy tab of the slayer reward shop.
- ExtendTabThe Extend tab of the slayer reward shop.
- RewardsTabThe tabs of the slayer reward shop.
- TasksTabThe Tasks tab of the slayer reward shop: block or cancel tasks.
- UnlockTabThe Unlock tab of the slayer reward shop.
- UnlockTab.UnlocksSlayer unlocks you can buy.
com.tonic.data.smithingBars and the items you can smith from them.10
- AdamantItemAdamant smithable items.
- BarTypeRepresents all types of metal bars that can be smelted in the game.
- BronzeItemBronze smithable items.
- IronItemIron smithable items.
- MithrilItemMithril smithable items.
- OreRequirementRepresents an ore requirement for smelting a bar.
- RuneItemRune smithable items.
- SmeltingModifierBase interface for smelting modifiers.
- SmithableItemInterface for smithable items across different metals.
- SteelItemSteel smithable items.
com.tonic.data.tradingShops and their stock.3
com.tonic.data.wrappersThe NPCs, players, items, objects and projectiles the API gives you.9
- ActorExWhat NPCs and players have in common: name, animation, movement and death.
- GraphicsObjectExNative read-only view of a scene graphics object.
- ItemContainerExAn item container such as the inventory or the bank, as wrapped items.
- ItemExAn item in your inventory or the bank.
- NpcExAn NPC near you.
- PlayerExA player. getLocal() is you.
- ProjectileExRead-only native projectile identity and lifetime for event-driven overlays.
- TileItemExAn item on the ground.
- TileObjectExAn object on a tile, such as a tree, door or bank booth.
com.tonic.data.wrappers.abstractionsInterfaces of the wrapper classes.4
com.tonic.queriesSearches over NPCs, players, objects, ground items, inventories, shops and worlds.12
- InventoryQueryQuery class for searching and filtering items in an inventory.
- ItemSpawnQueryQuery builder for static item spawn metadata.
- LocationQueryA query class for filtering and manipulating Tile locations in the game world.
- NpcQueryA search over the NPCs around you. Chain filters, then take a result.
- PlayerQueryA query class for filtering and retrieving Player entities in the game.
- QuestHelperQueryA search over what Quest Helper highlights.
- SafespotQueryQuery builder for solved safespot plans.
- ShopQueryQuery class for searching and filtering shops.
- TileItemQueryA query builder for TileItemEx objects.
- TileObjectQueryA query to find TileObjectEx's in the game world.
- WidgetQueryA query class to filter and find widgets in the game client.
- WorldQueryA query builder for filtering and sorting game worlds.
com.tonic.queries.abstractionsResults shared by every search.2
com.tonic.queries.combinedOne search over several kinds of entity at once.1
com.tonic.services.pathfinder.requirementsRequirements used by routes and teleports.1
com.tonic.utilVitaPlugin, the plugin base with a loop() that may wait, and dialogue trees.2
com.tonic.util.handlerBuild a plugin as numbered steps that run one per game tick.4
- AbstractHandlerBuilderBase of HandlerBuilder and the builders in com.tonic.api.handlers: steps, delays and walking.
- HandlerBuilderBuilds a StepHandler: numbered steps that run one at a time, one per call to step().
- StepContextValues that the steps of one StepHandler share.
- StepHandlerManages transport stateful step execution.
RuneLite
net.runelite.api.coordsTile coordinates.1
net.runelite.api.eventsGame events.1
net.runelite.client.configSettings: the interface the Manager shows as your plugin's settings.1
net.runelite.client.eventbusEvent handler methods.1
net.runelite.client.pluginsYour plugin class and its description.2
net.runelite.client.uiSide panels and the buttons that open them.1
net.runelite.client.ui.overlayOverlays drawn over the game.1
Java
java.ioBase interfaces.1
java.langText, numbers and the base classes.10
- CharSequenceText in general. String is one.
- ComparableThings with an order. String implements it.
- EnumThe base class of Java enum types.
- ExceptionAn error. Plugin.startUp() and Plugin.shutDown() may throw it.
- IterableAnything a for loop can walk over, such as a List.
- MathArithmetic: absolute values, the larger or smaller of two numbers, rounding and more.
- ObjectThe base class of every class.
- OverrideMarks a method that replaces one from the parent class, such as Plugin.startUp().
- StringText. These methods work as in Java 11.
- ThrowableThe base class of Exception. Pass one to Logger.warn(String, Throwable) to log its stack trace.
java.lang.annotationUsed by the plugin annotations.6
- AnnotationThe base interface of annotations such as PluginDescriptor.
- DocumentedUsed inside the declarations of PluginDescriptor and Subscribe.
- ElementTypeUsed inside the declarations of PluginDescriptor and Subscribe.
- RetentionUsed inside the declarations of PluginDescriptor and Subscribe.
- RetentionPolicyUsed inside the declarations of PluginDescriptor and Subscribe.
- TargetUsed inside the declarations of PluginDescriptor and Subscribe.
java.utilThe lists the API returns. Make your own with the collections below.3
Logging
org.slf4jLogging. In the developer client your lines show in the Log tab.2
Other
com.google.injectUsed by the Plugin base class.1
Your plugin can also use plain Java and some RuneLite classes. See the full list.
A complete plugin
Opens the nearest bank when your inventory is full. Put it in the starter in place of the example class.
package com.example.autobank;
import com.tonic.api.entities.NpcAPI;
import com.tonic.api.game.GameAPI;
import com.tonic.api.widgets.BankAPI;
import com.tonic.api.widgets.InventoryAPI;
import com.tonic.data.wrappers.NpcEx;
import net.runelite.api.events.GameTick;
import net.runelite.client.eventbus.Subscribe;
import net.runelite.client.plugins.Plugin;
import net.runelite.client.plugins.PluginDescriptor;
@PluginDescriptor(
name = "Auto Bank",
description = "Opens the nearest bank when your inventory is full",
tags = {"bank", "example"}
)
public final class AutoBankPlugin extends Plugin {
private int waitTicks;
@Override
protected void startUp() {
waitTicks = 0;
}
@Subscribe
public void onGameTick(GameTick tick) {
if (!GameAPI.isLoggedIn() || GameAPI.isScreenFading()) {
return;
}
if (waitTicks > 0) {
waitTicks--;
return;
}
if (InventoryAPI.isFull() && !BankAPI.isOpen()) {
NpcEx banker = NpcAPI.search().withName("Banker").alive().within(15).nearest();
if (banker != null) {
NpcAPI.interact(banker, "Bank");
waitTicks = 2;
}
}
}
}All 32 examples here build on SDK 2.1.330-community.1 and pass the same code check as your upload.