Latite Scripting Documentation (Exports)
Interface
Source: game.d.ts:1
captureCursor():
void
Captures the mouse cursor (hides it and allows the player to look around using the mouse cursor.)
Source: game.d.ts:75
void
executeCommand(cmd:
string):void
Execute an in-game command.
Source: game.d.ts:12
| Parameter | Type | Description |
|---|---|---|
| cmd | string |
The command to send. Be sure to add '/' before your command. |
void
getDimension():
Dimension
use dimension
Get the Dimension object.
Source: game.d.ts:55
getFeaturedServer():
null|string
Gets the featured server name you are connected to. This will return null if you are not in a featured server.
Featured server examples: "The Hive" "CubeCraft" "InPvP" "Mineplex"
Source: game.d.ts:37
null | string
getInputBinding(name:
InputBinding):number
Gets the user's input setting. Usually a key code; for example, "forward" returns KeyCode.W by default.
If this function returns 0, either the key is set to nothing or the specified name was not found.
Source: game.d.ts:87
| Parameter | Type |
|---|---|
| name | InputBinding |
number
getLocalPlayer():
null|LocalPlayer
Get your player. This will return null if you are not in a game.
Source: game.d.ts:25
null | LocalPlayer
getMousePos():
Vector2
Get the mouse position.
Source: game.d.ts:70
getPort():
number
Gets the port of the server you're connected to. If you are not in a server, it returns 0.
Source: game.d.ts:42
number
getScreenSize():
Vector2
Gets the size of the viewport.
Source: game.d.ts:65
getServer():
null|string
Gets the server you are connected to. This will return null if you are not in a server.
Source: game.d.ts:30
null | string
getWorld():
World
use world
Get the World object.
Source: game.d.ts:48
isInUI():
boolean
Get whether you are in a UI screen
Source: game.d.ts:60
boolean
playSoundUI( soundName:
string, volume:number, pitch:number):void
Plays a sound. Refer to https://www.digminecraft.com/lists/sound_list_pe.php for sounds
Source: game.d.ts:20
| Parameter | Type | Description |
|---|---|---|
| soundName | string |
The sound name, for example: mob.enderdragon.growl |
| volume | number |
The volume of the sound. Default is 1 |
| pitch | number |
Pitch of the sound. Default is 1 |
void
releaseCursor():
void
Releases the mouse cursor.
Source: game.d.ts:80
void
sendChatMessage(msg:
string):void
Sends a chat message.
Source: game.d.ts:6
| Parameter | Type | Description |
|---|---|---|
| msg | string |
The message to send. |
void