Plugin API
Every hook, global and type a plugin can reach. The reference is generated from author_globals.d.luau, the declaration the marketplace builder typechecks uploads against, so what is listed here is what an upload may call.
Before you start
- The API is a set of globals, not a module.
requireloads your own files fromsrc/; a package import such asrequire("@bento/sdk")is rejected at upload. - Casing says which kind a global is. Lowercase ones (
player,scene,bank) are the live game, read fresh in every callback. Capitalised ones (Skill,VarbitID,WorldPoint) are constants and constructors that never change. - A plugin is the object
Plugin.new{...}returns, and its hooks are methods on it:function plugin:onGameTick(event). The Plugin page lists every one, and the guide walks through a complete plugin. - For completion and typechecking in your editor, point luau-lsp at
author_globals.d.luau.
Plugin
1 typeThe object Plugin.new{...} builds and src/main.luau returns, with every hook the host reads from it.
The game
59 typesThe live game. Lowercase globals, refreshed for every callback; reading one outside a callback raises.
bank- Bank open, deposit and withdraw, the PIN, and loadouts.
client- Client session flags, world membership, and host preferences.
grandExchange- Grand Exchange offers, collecting, and the restock machine.
manager- The loot and sustain machines.
player- The local player: walking, webwalking, vitals, inventory, gear, combat, magic and prayer.
scene- NPCs, players, objects, ground items, and reachability.
shop- Shop stock and buy/sell actions.
ui- The game's interface: tabs, keys, dialogues, widgets, and the host's dialogs.
utils- Elapsed time, for measuring.
world- The world directory, world hopping, and PvP threats.
audioPlayerbankSearchchatboxItemSearchchatboxPanelManagerchatClientchatColorConfigchatCommandManagerchatIconManagerchatMessageManagerclientBusclientConfigclientThreadclientUIconfigManagerdiscordServiceeventBusgfxhiscoreClienthiscoreManagerhookshttpimageCaptureinfoBoxManageritemManageritemStatChangesitemStatChangesServicekeyManagerloglootManagermenuManagermodelOutlineRenderermouseManagernotifiernpcManagernpcOverlayServicenpcUtiloverlayManagerpluginDatapluginManagerskillIconManagerslayerPluginServicespriteManagertagManagertimertooltipManagerwikiworldMapPointManagerworldServicexpTrackerService
Constants
306 typesCapitalised globals: constants and constructors, fixed for the life of the plugin and safe to keep.
AnimationID- Animation ids by name, and names by id.
Asset- Read bundled plugin assets as text or bytes.
AttackStyle- Which combat style is selected.
BreakManager- Scheduled breaks for this plugin, set up by the player.
ChatMessageType- Chat message types, as onChatMessage reports them.
ColorUtil- Colour helpers for overlays and panels.
DrawLayer- Which layer renderOverlay is drawing.
Humanizer- Scheduled short and AFK pauses for this plugin.
InteractKind- What an actor is interacting with.
InterfaceID- Interface group and component ids, both directions.
Json- Parse and encode JSON on the host.
QuestState- Where a quest stands: QuestState.FINISHED.
RequirementStatus- Whether one spell requirement is satisfied.
RunStatus- Where a state machine stands: running, done, blocked or idle.
Skill- The skills, as constants: Skill.ATTACK.
VarbitID- Varbit ids by name, and names by id.
VarClientID- Client-var ids by name, and names by id.
VarPlayerID- Varplayer ids by name, and names by id.
WebwalkResult- How a webwalk ended, or that it has not.
WidgetConfig- Click-mask bits for a widget component.
WorldPoint- Build a tile and do arithmetic on it.
AccountHashChangedActionsActorDeathAgilityShortcutAlternateSpritesAmbientSoundEffectCreatedAngleAnimationChangedAreaSoundEffectPlayedBackgroundComponentBeforeMenuRenderBeforeRenderBirdhouseStateCanvasSizeChangedChatboxItemSearchChatboxPanelManagerChatboxTextInputChatboxTextMenuInputChatCensorChatColorTypeChatMessageChatMessageBuilderClanChannelChangedClanIDClanMemberJoinedClanMemberLeftClanRankClientConfigClientPathsClientTickCollisionDataFlagColorColorSchemeCommandExecutedComponentConstantsComponentIDComponentOrientationCompostStateConfigManagerConstantsCounterCropStateDbRowIDDBTableIDDecorativeObjectDespawnedDecorativeObjectSpawnedDirectionDiscordPresenceEntityOpsEnumClassEnumIDEquipmentInventorySlotExperienceFakeXpDropFarmingSummaryFishingSpotFlashNotificationFocusChangedFontIDFontManagerFontTypeFriendsChatChangedFriendsChatMemberJoinedFriendsChatMemberLeftFriendsChatRankFriendsChatSyncFuzzySearchScorerGameObjectDespawnedGameObjectSpawnedGameStateGameStateChangedGameTickGeometryGrandExchangeOfferChangedGrandExchangeOfferStateGrandExchangeSearchedGraphicChangedGraphicIDGraphicsObjectCreatedGroundObjectDespawnedGroundObjectSpawnedHeadIconHighlightedNpcHighlightedNpcBuilderHintArrowTypeHiscoreEndpointHiscoreSkillHiscoreSkillTypeHitsplatAppliedHitsplatIDHotkeyListenerHttpWorldTypeIconIDImageComponentImageUtilInfoBoxInfoBoxComponentInfoBoxPriorityInputTypeInstanceTemplatesInteractingChangedInventoryIDItemItemContainerChangedItemDespawnedItemEquipmentStatsItemEquipmentStatsBuilderItemIDItemQuantityChangedItemQuantityModeItemSourceItemSpawnedItemStackItemStatChangesItemStatsItemVariationMappingJagexColorJagexColorsKeybindKeyCodeKitTypeLabelDisplayModeLayoutRoomLegacyAnimationIDLegacyInterfaceIDLegacyInventoryIDLegacyItemIDLegacyNpcIDLegacyObjectIDLineComponentLineComponentBuilderLineSocketLinkBrowserLoadoutStepLoopTimerLootDecisionLootRecordTypeLootStepLootWaitReasonMenuActionMenuEntryAddedMenuOpenedMenuOptionClickedMenuShouldLeftClickModelDataModifierlessKeybindNameableNameChangedNotificationNotificationSoundNpcChangedNPCCompositionNpcDespawnedNpcIDNpcSimNpcSpawnedNullNpcIDObjectIDOSTypeOverheadTextChangedOverlayOverlayLayerOverlayManagerOverlayMenuEntryOverlayPanelOverlayPositionOverlayPriorityOverlayUtilPanelComponentParamIDPatchKindPathQueryPerspectivePingPlayerChangedPlayerCompositionPlayerDespawnedPlayerLootReceivedPlayerSpawnedPointPositivityPostClientTickPostHealthBarConfigPostMenuSortPrayerPreMapLoadProgressBarComponentProgressPieComponentProjectileMovedPvpUnknownReasonQuantityFormatterQuestQueuedMessageQueuedMessageBuilderRangeStatChangeReachRemovedFriendRenderableRequestFocusTypeResizeableChangedRestockStepRouteOptionsRSTimeUnitRuneRuneScapeProfileRuneScapeProfileTypeScriptCallbackEventScriptEventScriptIDScriptPostFiredScriptPreFiredSeaCostQueryServerNpcLootSettingIDShellSkillColorSkullIconSoundEffectIDSoundEffectPlayedSoundEffectVolumeSoundIDSpellItemSpellsSplitComponentSplitComponentBuilderSpotanimIDSpriteIDSpritePixelsStatChangedStatsStatsChangesSustainStepSustainWaitReasonTabTextTextComponentTileItemTileSideTimerTitleComponentTitleComponentBuilderTooltipTooltipComponentTypedInputKindUnitsUsernameChangedVarbitChangedVarbitsVarClientIntVarClientIntChangedVarClientStrVarClientStrChangedVarPlayerVirtualMouseWallObjectDespawnedWallObjectSpawnedWidgetClosedWidgetDragWidgetItemWidgetItemOverlayWidgetLoadedWidgetMenuOptionWidgetModalModeWidgetModelTypeWidgetPositionModeWidgetSizeModeWidgetTextAlignmentWidgetTypeWidgetUtilWildcardMatcherWorldAreaWorldChangedWorldEntityWorldEntityDespawnedWorldEntitySpawnedWorldHopStageWorldListLoadWorldMapPointWorldMapPointBuilderWorldRegionWorldsFetchWorldTypeWorldUtilWorldViewWorldViewLoadedWorldViewUnloaded
Entities
29 typesWhat stands in the world and what describes it: actors, objects, items, widgets and their definitions.
AABBActorAmbientSoundEffectChatPlayerClientObjectControllerDequeDialogueDialogueKindDialogueOptionDynamicObjectFriendFriendsChatMemberGraphicsObjectHealthBarConfigHitsplatIgnoreIndexedObjectSetItemCompositionMeshNPCNpcOverridesObjectCompositionParamHolderPendingLoginPlayerProjectileTileObjectWidgetWorldEntityConfig
Coordinates
2 typesThe ways of naming where something is.
Queries
6 typesBuilders that narrow the scene and containers down to what you are looking for.
By domain
The types a lowercase global returns, filed under that global: Inventory sits under player because player:inventory() is how you reach it.
player
149 typesActorSpotAnimAmbientSoundEffectDequeAnimationBirdhouseStatusBoardedBoatBoatFacilityBoatFacilityKindBoatFacilityStateBoatFacilityStateKindBoatHeadingBoatHelmStatusBoatKindBoatLocationBoatLocationKindBoatMotionBoatPartBoatPartKindBoatPositionBoatResistancesBoatSpeedBoatSpeedBoostBoatStatsBoatTeleportFocusBoatTrimBuffBufferProviderBuffsCameraFocusableEntityCastabilityChargesChatLineBufferChatMessageTableClanChannelClanChannelMemberClanMemberClanSettingsClanTitleClientObjectCollisionDataCombatConsumablesCrewmateCrewmateKindCrewStatCrewStationDailyDailyKindDecorativeObjectDiariesDiaryAreaDiaryDifficultyDockDockAreaDockAreaKindDockKindEnumCompositionEquipmentEssencePouchEssencePouchSizeFarmingFarmingContractFarmingPatchInfoFarmingPatchStatusFarmingTickOffsetFontTypeFaceFriendContainerFriendsChatManagerGameObjectGrandExchangeOfferGroundObjectHouseHouseAltarIndexDataBaseIndexedSpriteInventoryItemChargesItemContainerItemHandleKingdomMagicMapElementConfigMenuMessageNodeModelNameableNameableContainerNodeCacheNpcCombatStatsNpcHealthNpcSetOwnedBoatPilotLapPilotStatusPlayerSetPortTaskPortTaskFacilityPortTaskItemPortTaskKindPrayerbookPrayersPreferencesQuestsRouteSailRouteStepRunePouchSailingSceneSceneTileModelSceneTilePaintScriptEventBuilderSeaOptionsShipwreckShipwreckKindSlayerTaskSpellbookSpellInfoStructCompositionTextureTextureProviderTrialTrialKindTrialPilotTrialRankVarbitCompositionVitalsVoyageVoyageAreaVoyageArrivalVoyageClickVoyageFailureVoyageOptionsVoyageStatusWallObjectWeaponClassWebwalkWebwalkFailureCodeWebwalkSnapshotWebwalkStatusWidgetConfigNodeWidgetNodeWorldWorldEntitySetWorldMapWorldMapDataWorldMapIconWorldMapRegionWorldMapRendererWorldViewSetWornSlot
world
7 typesbank
6 typesscene
16 typesui
8 typesmanager
5 typesgrandExchange
3 typesshop
1 typepluginManager
2 typeseventBus
3 typesconfigManager
12 typestooltipManager
2 typesitemManager
2 typesmodelOutlineRenderer
1 typetimer
2 typeshttp
3 typesnotifier
1 typediscordService
2 typesitemStatChanges
3 typesworldService
2 typeshiscoreManager
2 typeschatClient
2 typesmenuManager
1 typechatCommandManager
1 typeungrouped
5 typesPassed to hooks
13 typesPassed only to hooks: the draw surface, the panel, the window, and event objects.
Options you pass in
38 typesRecords you build and pass to a call.
ConfigItemFieldsConfigSectionFieldsEquippedLoadoutItemInventoryGoalEntryInventoryGoalItemPanelAlignPanelButtonOptionsPanelCanvasOptionsPanelCheckOptionsPanelColorPanelComboOptionsPanelFontFamilyPanelFontOptionsPanelFrameOptionsPanelGridOptionsPanelIconNamePanelImageOptionsPanelImageSourcePanelImageSpecPanelInsetsPanelLabelOptionsPanelMarginPanelScrollbarPolicyPanelScrollOptionsPanelSizedOptionsPanelSpinnerOptionsPanelTextAreaOptionsPanelTextEditOptionsPanelTextOptionsPanelTooltipPanelTooltipRunPanelTooltipTextPluginDescriptorFieldsRecommendedSettingRowOptsRowSpanRowTwistTileEdgeSpec
Compatibility classes
243 typesStand-ins for Swing, AWT, the JDK and third-party library classes. They exist for ports, and new plugins do not need them: see the translation guide.
AbstractActionAbstractButtonAbstractFormatterAbstractFormatterFactoryAbstractListModelActionEventActionListenerActionMapActivatableAffineTransformAlphaCompositeArc2DAreaAwtInputEventAwtKeyEventAwtMouseEventAwtWindowBadLocationExceptionBase64Base64DecoderBase64EncoderBasicButtonUIBasicStrokeBasicToggleButtonUIBorderBorderFactoryBorderLayoutBoxBoxFillerBoxLayoutBufferedImageButtonGroupButtonModelCannotUndoExceptionCardLayoutChangeEventCharMatcherCharsetChronoUnitChronoZonedDateTimeclientToolbarClipboardColorJButtonColorPickercolorPickerManagerCompletableFutureComponentComponentAdapterComponentEventComponentListenerCompoundBorderContainerCursorDataFlavorDateDateFormatDateTimeFormatterDayOfWeekDecimalFormatDefaultComboBoxModelDefaultFormatterDefaultListCellRendererDefaultListModelDelayedDialogDimensionDimmableJPanelDocumentDocumentEventDocumentListenerDragAndDropReorderPaneDurationDurationFormatUtilsDynamicGridLayoutEllipse2DEmptyBorderexecutorExecutorExecutorsExecutorServiceFileFlatTextFieldFlowLayoutFocusAdapterFocusEventFocusListenerFontFontMetricsFormatStyleFormBodyFormBodyBuilderFrameFutureGeneralPathGradientPaintGraphicsGraphics2DGridBagConstraintsGridBagLayoutGridLayoutGroupLayoutGroupLayoutGroupHashCodeHasherHashFunctionHashingHTMLEditorKitHttpUrlHttpUrlBuilderHyperlinkEventHyperlinkEventEventTypeClassHyperlinkListenerIconIconTextFieldIconTextFieldIconClassImageImageIconImageObserverInputEventInputMapInsetsInstantIOExceptionItemEventJaroWinklerDistanceJButtonJCheckBoxJComboBoxJComponentJDialogJEditorPaneJFormattedTextFieldJFormattedTextFieldAbstractFormatterClassJFormattedTextFieldAbstractFormatterFactoryClassJFrameJLabelJLayeredPaneJListJMenuItemJOptionPaneJPanelJPasswordFieldJPopupMenuJRadioButtonJScrollBarJScrollPaneJSeparatorJShadowedLabelJsonNullJSpinnerJSpinnerDefaultEditorJTextAreaJTextComponentJTextFieldJToggleButtonJToolTipJViewportKeyAdapterKeyEventKeyListenerKeyStrokeLine2DListCellRendererListDataEventListDataListenerListSelectionEventListSelectionModelLocalDateLocalDateTimeLocalPointLocalTimeLongestCommonSubsequenceMatcherMatchResultMaterialTabMaterialTabGroupMatteBorderMediaTypeMouseAdapterMouseDragEventForwarderMouseEventMouseListenerMouseWheelEventMouseWheelListenerNavigationButtonNavigationButtonBuilderNumberFormatokHttpClientOverlayLayoutPaintPath2DPatternPluginErrorPanelPluginPanelPoint2DPolygonPopupMenuEventPopupMenuListenerProgressBarRectangleRectangle2DRectangularShapeRegexRenderingHintsRenderingHintsKeyRequestRequestBodyRequestBuilderRoundingModeScrollPaneConstantsShapeSimilarityScoreSimpleDateFormatSpinnerModelSpinnerNumberModelStandardCharsetsStringSelectionStringUtilsStyleSheetSwingConstantsSwingEventSwingTimerSwingUtilSwingUtilitiesTextStyleThinProgressBarThrowableTimeUnitToolkitTrayIconUndoableEditUndoableEditEventUndoManagerUnitFormatterFactoryURLDecoderURLEncoderWindowAdapterWindowConstantsWindowEventWindowEventBaseWindowListenerZonedDateTimeZoneId