Skip to content

Scoped Api

A scoped api is available to all scripts with the api variable.

hotkeys: Readonly<ScopedHotkeysApi>

Functions to listen for key combinations


lib: (name) => any = Api.libs.get

Gets the exported values of a library

ParameterType
namestring

any


libs: Readonly<LibsApi> = Api.libs

Methods for getting info on libraries


net: Readonly<ScopedNetApi>

Ways to interact with the current connection to the server, and functions to send general requests


onStop: (callback) => void

Run a callback when the plugin or library is disabled

ParameterType
callback() => void

void


openSettingsMenu: (callback) => void

Run a callback when the plugin’s settings menu button is clicked

This function is not available for libraries

ParameterType
callback() => void

void


patcher: Readonly<ScopedPatcherApi>

Functions for intercepting the arguments and return values of functions


plugin: (name) => any = Api.plugins.get

Gets the exported values of a plugin, if it has been enabled

ParameterType
namestring

any


plugins: Readonly<PluginsApi> = Api.plugins

Methods for getting info on plugins


rewriter: Readonly<ScopedRewriterApi>

Functions to edit Gimkit’s code


storage: Readonly<ScopedStorageApi>

Functions for persisting data between reloads


UI: Readonly<ScopedUIApi>

Functions for interacting with the DOM

get notification(): any

Gimkit’s notification object, only available when joining or playing a game

https://ant.design/components/notification

any


get React(): typeof React

Gimkit’s internal react instance

typeof React


get ReactDOM(): __module

Gimkit’s internal reactDom instance

__module


get stores(): any

A variety of gimkit internal objects available in 2d gamemodes

any