Skip to content

Blueboat Api

The blueboat api is for sending and recieving data in non-2d (classic) modes.

// fired when data is recieved on a certain channel
api.net.blueboat.on("CHANNEL", (data) => {
return "new data"; // Replace the data with "new data" before Gimkit processes it
});
// fired when data is sent on a certain channel
api.net.blueboat.on("send:CHANNEL", (data) => {
return null; // Cancel the data being sent
});

get room(): any

The blueboat room that the client is connected to, or null if there is no connection

any

off<C>(channel, listener): void

Removes a listener added by on or once

Type Parameter
C extends keyof Messages1d
Parameter Type
channel C
listener (data) => void | Messages1d[C] | null

void


offAny(listener): void

Removes a listener added by onAny

Parameter Type
listener (channel, data) => any

void


on<C>(channel, listener): void

Listens for an incoming or outgoing message on a specific channel. Returning a value from the listener updates what is received. Returning null cancels the message entirely.

Type Parameter
C extends keyof Messages1d
Parameter Type
channel C
listener (data) => void | Messages1d[C] | null

void


onAny(listener): void

Listens for any messages on any channel. Returning a value from the listener updates what is sent. Returning null cancels the message entirely.

Parameter Type
listener (channel, data) => any

void


once<C>(channel, listener): void

Listens for the next incoming or outgoing message on a specific channel. Returning a value from the listener updates what is received. Returning null cancels the message entirely.

Type Parameter
C extends keyof Messages1d
Parameter Type
channel C
listener (data) => void | Messages1d[C] | null

void


send<C>(channel, …args): void

Sends a message to the server on a specific channel

Type Parameter
C extends keyof SentMessages1d
Parameter Type
channel C
data any

void


sendDirect<C>(channel, …args): void

Sends a message to the server on a specific channel, bypassing listeners added by plugins

Type Parameter
C extends keyof SentMessages1d
Parameter Type
channel C
data any

void