Scoped Api
A scoped api is available to all scripts with the api
variable.
Properties
Section titled “Properties”hotkeys
Section titled “hotkeys”hotkeys:
Readonly
<ScopedHotkeysApi
>
Functions to listen for key combinations
lib: (
name
) =>any
=Api.libs.get
Gets the exported values of a library
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
name | string |
Returns
Section titled “Returns”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()
Section titled “onStop()”onStop: (
callback
) =>void
Run a callback when the plugin or library is disabled
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
callback | () => void |
Returns
Section titled “Returns”void
openSettingsMenu()
Section titled “openSettingsMenu()”openSettingsMenu: (
callback
) =>void
Run a callback when the plugin’s settings menu button is clicked
This function is not available for libraries
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
callback | () => void |
Returns
Section titled “Returns”void
patcher
Section titled “patcher”patcher:
Readonly
<ScopedPatcherApi
>
Functions for intercepting the arguments and return values of functions
plugin()
Section titled “plugin()”plugin: (
name
) =>any
=Api.plugins.get
Gets the exported values of a plugin, if it has been enabled
Parameters
Section titled “Parameters”Parameter | Type |
---|---|
name | string |
Returns
Section titled “Returns”any
plugins
Section titled “plugins”plugins:
Readonly
<PluginsApi
> =Api.plugins
Methods for getting info on plugins
rewriter
Section titled “rewriter”rewriter:
Readonly
<ScopedRewriterApi
>
Functions to edit Gimkit’s code
storage
Section titled “storage”storage:
Readonly
<ScopedStorageApi
>
Functions for persisting data between reloads
UI:
Readonly
<ScopedUIApi
>
Functions for interacting with the DOM
Accessors
Section titled “Accessors”notification
Section titled “notification”Get Signature
Section titled “Get Signature”get notification():
any
Gimkit’s notification object, only available when joining or playing a game
https://ant.design/components/notification
Returns
Section titled “Returns”any
Get Signature
Section titled “Get Signature”get React(): typeof
React
Gimkit’s internal react instance
Returns
Section titled “Returns”typeof React
ReactDOM
Section titled “ReactDOM”Get Signature
Section titled “Get Signature”get ReactDOM():
__module
Gimkit’s internal reactDom instance
Returns
Section titled “Returns”__module
stores
Section titled “stores”Get Signature
Section titled “Get Signature”get stores():
any
A variety of gimkit internal objects available in 2d gamemodes
Returns
Section titled “Returns”any