Events
Where your script code goes to be run at a certain time

Info

How to cancel an event

1
event.setCancelled(true)
Copied!
This will cancel the event.

Enable

1
script.onEnable(function () {...
Copied!
This event will be called every time the script is enabled.

Disable

1
script.onDisable(function () {...
Copied!
This event will be called every time the script is disabled.

Update

1
script.onUpdate(function (event) {...
Copied!
Called to update the entity's position/logic.

Functions

Function
Description
isPre()
Returns true the event is onPre
isPost()
Returns true the event is onPost
isGround()
Returns true the player is on ground
setGround(ground)
Sets the player's on ground state to the new state

Packet Send

1
script.onPacketSend(function (event) {...
Copied!
Called before packets are sent to server.

Functions

Function
Description
getPacketID()
Returns the packet ID as a Number

​Packet Receive​

1
script.onPacketReceive(function (event) {...
Copied!
Called on packets received, before the client handles them.

Tick

1
script.onTick(function (event) {...
Copied!
Called on each tick.

Motion

1
script.onMotion(function (event) {...
Copied!
Called on motion updates.

Functions

Function
Description
setX(x)
Sets the players x position using the event
setY(y)
Sets the players y position using the event
setZ(z)
Sets the players z position using the event
isGround()
Returns true the player is on ground
setGround(ground)
Sets the player's on ground state to the new state
getYaw()
Returns the players yaw as a Number
setYaw(yaw)
Sets the players yaw using the event
getPitch()
Returns the players pitch as a Number
setPitch(pitch)
Sets the players pitch using the event
isPre()
Returns true the event is onPre
isPost()
Returns true the event is onPost

Player Move

1
script.onPlayerMove(function (event) {...
Copied!
Called when a player is moving.

Render 3D

1
script.onRender3D(function (event) {...
Copied!
Called on the rendering of 3D objects.

Functions

Function
Description
getTicks()
Returns the event's ticks as a Number

Render 2D

1
script.onRender2D(function (event) {...
Copied!
Called on the rendering of 2D objects.

Shader

1
script.onShader(function (ev) {...
Copied!
Everything in this event will be blurred when the Blur module is enabled and will have a shadow when the shadow boolean is enabled in the Blur module
Last modified 26d ago