Buy Me a Coffee at ko-fi.com

A global API dedicated to specifically the host of the avatar
For other viewers, these do nothing

Sets the action bar message to the given text
The boolean parameter defaults to false

overload 1:
HostAPI.actionbar(text: String): HostAPI
typings.-1808118735typings.-1531650254
Method PropertyFluent DescriptionRepresentation
text accepts
Return Value
overload 2:
HostAPI.actionbar(text: String, animated: Boolean): HostAPI
typings.-1808118735typings.1729365000typings.-1531650254
Method PropertyFluent DescriptionRepresentation
text accepts
animated accepts
Return Value

Appends the message on the recent chat history

overload 1:
HostAPI.appendChatHistory(message: String): HostAPI
typings.-1808118735typings.-1531650254
Method PropertyFluent DescriptionRepresentation
message accepts
Return Value

Sets the color of the text that is currently being typed into the chat window

overload 1:
HostAPI.chatColor(color: Vector3): HostAPI
typings.2002444080typings.-1531650254
Method PropertyFluent DescriptionRepresentation
color accepts
Return Value
overload 2:
HostAPI.chatColor(r: Number, g: Number, b: Number): HostAPI
typings.-1950496919typings.-1950496919typings.-1950496919typings.-1531650254
Method PropertyFluent DescriptionRepresentation
r accepts
g accepts
b accepts
Return Value

Sets the text currently being typed in the chat window to the given string

overload 1:
HostAPI.chatText(text: String): HostAPI
typings.-1808118735typings.-1531650254
Method PropertyFluent DescriptionRepresentation
text accepts
Return Value

Clears the current title from the GUI

overload 1:
HostAPI.clearTitle(): HostAPI
typings.-1531650254
Method PropertyFluent DescriptionRepresentation
Return Value

Sets the clipboard text

overload 1:
HostAPI.clipboard(text: String): HostAPI
typings.-1808118735typings.-1531650254
Method PropertyFluent DescriptionRepresentation
text accepts
Return Value

Gets the remaining amount of air of the player

overload 1:
HostAPI.getAir(): Integer
typings.-672261858
Method PropertyFluent DescriptionRepresentation
Return Value

Returns a fraction (0 to 1) of the charge of the player attack
If less than 1, every attack will result in a weak attack

overload 1:
HostAPI.getAttackCharge(): Number
typings.-1950496919
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the chat window text color

overload 1:
HostAPI.getChatColor(): Integer
typings.-672261858
Method PropertyFluent DescriptionRepresentation
Return Value

Returns a table with information about a chat message
Takes an index, where 1 means the last message on chat

overload 1:
HostAPI.getChatMessage(index: Integer): Table
typings.-672261858typings.80563118
Method PropertyFluent DescriptionRepresentation
index accepts
Return Value

Gets the text that is currently being typed into the chat window

overload 1:
HostAPI.getChatText(): String
typings.-1808118735
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the text from the clipboard

overload 1:
HostAPI.getClipboard(): String
typings.-1808118735
Method PropertyFluent DescriptionRepresentation
Return Value

Returns the current targeted block set by the client
Returns the block, the hit position, and the targeted block face as three separate values

overload 1:
HostAPI.getPickBlock(): Varargs
typings.1901216868
Method PropertyFluent DescriptionRepresentation
Return Value

Returns the currently targeted entity set by the client

overload 1:
HostAPI.getPickEntity(): EntityAPI
typings.1263373079
Method PropertyFluent DescriptionRepresentation
Return Value

Returns the current reach distance of the player

overload 1:
HostAPI.getReachDistance(): Number
typings.-1950496919
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the class name of the screen the player is currently on
If the player is not currently in a screen, returns nil

overload 1:
HostAPI.getScreen(): String | nil
typings.-1209970754
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the item in a screen slot
The slot is either their numerical id (0 indexed) or the slot string, as used in the /item command
If the player is not currently in a screen, the screen has no slots, or the slot index is greater than the maximum, returns nil

overload 1:
HostAPI.getScreenSlot(slot: String): ItemStack
typings.-1808118735typings.-148280555
Method PropertyFluent DescriptionRepresentation
slot accepts
Return Value
overload 2:
HostAPI.getScreenSlot(slot: Integer): ItemStack
typings.-672261858typings.-148280555
Method PropertyFluent DescriptionRepresentation
slot accepts
Return Value

Gets the number of slots in the screen the player is currently in
If the player is not currently in a screen or the screen has no slots, returns nil

overload 1:
HostAPI.getScreenSlotCount(): Integer
typings.-672261858
Method PropertyFluent DescriptionRepresentation
Return Value

Gets an ItemStack for the item in the given slot
The slot is either their numerical id (0 indexed) or the slot string, as used in the /item command

overload 1:
HostAPI.getSlot(slot: String): ItemStack
typings.-1808118735typings.-148280555
Method PropertyFluent DescriptionRepresentation
slot accepts
Return Value
overload 2:
HostAPI.getSlot(slot: Integer): ItemStack
typings.-672261858typings.-148280555
Method PropertyFluent DescriptionRepresentation
slot accepts
Return Value

Returns a table of all of the player's status effects
The table contains sub-tables, each of which contains the name, amplifier, duration, and particle visibility of each status effect

overload 1:
HostAPI.getStatusEffects(): Table
typings.80563118
Method PropertyFluent DescriptionRepresentation
Return Value

Checks if this avatar is currently uploaded

overload 1:
HostAPI.isAvatarUploaded(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Checks if the host has the chat screen opened

overload 1:
HostAPI.isChatOpen(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

No description available
figura.docs.host.is_chat_verified

overload 1:
HostAPI.isChatVerified(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Checks if the host has a container screen opened

overload 1:
HostAPI.isContainerOpen(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Checks if the cursor is currently unlocked
Only responds to your own changes in your script, not anything done by Minecraft itself

overload 1:
HostAPI.isCursorUnlocked(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Checks if the player is currently flying

overload 1:
HostAPI.isFlying(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Returns true if this instance of the script is running on host

overload 1:
HostAPI.isHost(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Checks if the player is jumping
Note this is only true during the first tick the player started jumping

overload 1:
HostAPI.isJumping(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Takes a screenshot from the current screen and returns a Texture of it

overload 1:
HostAPI.screenshot(name: String): Texture
typings.-1808118735typings.246836475
Method PropertyFluent DescriptionRepresentation
name accepts
Return Value

Sends the given command in the chat

overload 1:
HostAPI.sendChatCommand(command: String): HostAPI
typings.-1808118735typings.-1531650254
Method PropertyFluent DescriptionRepresentation
command accepts
Return Value

Sends the given message in the chat

overload 1:
HostAPI.sendChatMessage(message: String): HostAPI
typings.-1808118735typings.-1531650254
Method PropertyFluent DescriptionRepresentation
message accepts
Return Value

Sets the action bar message to the given text
The boolean parameter defaults to false

overload 1:
HostAPI.setActionbar(text: String): HostAPI
typings.-1808118735typings.-1531650254
Method PropertyFluent DescriptionRepresentation
text accepts
Return Value
overload 2:
HostAPI.setActionbar(text: String, animated: Boolean): HostAPI
typings.-1808118735typings.1729365000typings.-1531650254
Method PropertyFluent DescriptionRepresentation
text accepts
animated accepts
Return Value

Sets the color of the text that is currently being typed into the chat window

overload 1:
HostAPI.setChatColor(color: Vector3): HostAPI
typings.2002444080typings.-1531650254
Method PropertyFluent DescriptionRepresentation
color accepts
Return Value
overload 2:
HostAPI.setChatColor(r: Number, g: Number, b: Number): HostAPI
typings.-1950496919typings.-1950496919typings.-1950496919typings.-1531650254
Method PropertyFluent DescriptionRepresentation
r accepts
g accepts
b accepts
Return Value

Modifies a chat message with the given text
Takes an index, were 1 means the last message on chat
Setting the message to nil will effectively remove it from the chat

overload 1:
HostAPI.setChatMessage(index: Integer): HostAPI
typings.-672261858typings.-1531650254
Method PropertyFluent DescriptionRepresentation
index accepts
Return Value
overload 2:
HostAPI.setChatMessage(index: Integer, newMessage: String): HostAPI
typings.-672261858typings.-1808118735typings.-1531650254
Method PropertyFluent DescriptionRepresentation
index accepts
newMessage accepts
Return Value
overload 3:
HostAPI.setChatMessage(index: Integer, newMessage: String, backgroundColor: Vector3): HostAPI
typings.-672261858typings.-1808118735typings.2002444080typings.-1531650254
Method PropertyFluent DescriptionRepresentation
index accepts
newMessage accepts
backgroundColor accepts
Return Value

Sets the text currently being typed in the chat window to the given string

overload 1:
HostAPI.setChatText(text: String): HostAPI
typings.-1808118735typings.-1531650254
Method PropertyFluent DescriptionRepresentation
text accepts
Return Value

Sets the clipboard text

overload 1:
HostAPI.setClipboard(text: String): HostAPI
typings.-1808118735typings.-1531650254
Method PropertyFluent DescriptionRepresentation
text accepts
Return Value

Sets a slot with an ItemStack
The slot is either their numerical id (0 indexed) or the slot string, as used in the /item command
Slot -1 uses the first available slot
Only runs for creative mode

overload 1:
HostAPI.setSlot(slot: String): HostAPI
typings.-1808118735typings.-1531650254
Method PropertyFluent DescriptionRepresentation
slot accepts
Return Value
overload 2:
HostAPI.setSlot(slot: Integer): HostAPI
typings.-672261858typings.-1531650254
Method PropertyFluent DescriptionRepresentation
slot accepts
Return Value
overload 3:
HostAPI.setSlot(slot: String, item: String): HostAPI
typings.-1808118735typings.-1808118735typings.-1531650254
Method PropertyFluent DescriptionRepresentation
slot accepts
item accepts
Return Value
overload 4:
HostAPI.setSlot(slot: Integer, item: ItemStack): HostAPI
typings.-672261858typings.-148280555typings.-1531650254
Method PropertyFluent DescriptionRepresentation
slot accepts
item accepts
Return Value

Sets the current subtitle to the given text
The text is given as a JSON string

overload 1:
HostAPI.setSubtitle(text: String): HostAPI
typings.-1808118735typings.-1531650254
Method PropertyFluent DescriptionRepresentation
text accepts
Return Value

Sets the current title to the given text
The text is given as json

overload 1:
HostAPI.setTitle(text: String): HostAPI
typings.-1808118735typings.-1531650254
Method PropertyFluent DescriptionRepresentation
text accepts
Return Value

Sets the duration of the title on the screen, also its fade-in and fade-out durations

overload 1:
HostAPI.setTitleTimes(timesData: Vector3): HostAPI
typings.2002444080typings.-1531650254
Method PropertyFluent DescriptionRepresentation
timesData accepts
Return Value
overload 2:
HostAPI.setTitleTimes(fadeInTime: Integer, stayTime: Integer, fadeOutTime: Integer): HostAPI
typings.-672261858typings.-672261858typings.-672261858typings.-1531650254
Method PropertyFluent DescriptionRepresentation
fadeInTime accepts
stayTime accepts
fadeOutTime accepts
Return Value

Toggles locking of your cursor, letting you move it freely on the screen instead of it controlling your player's rotation

overload 1:
HostAPI.setUnlockCursor(boolean: Boolean): HostAPI
typings.1729365000typings.-1531650254
Method PropertyFluent DescriptionRepresentation
boolean accepts
Return Value

Sets the current subtitle to the given text
The text is given as a JSON string

overload 1:
HostAPI.subtitle(text: String): HostAPI
typings.-1808118735typings.-1531650254
Method PropertyFluent DescriptionRepresentation
text accepts
Return Value

Animates swinging the player's arm
If the boolean is true, then the offhand is the one that swings

overload 1:
HostAPI.swingArm(): HostAPI
typings.-1531650254
Method PropertyFluent DescriptionRepresentation
Return Value
overload 2:
HostAPI.swingArm(offhand: Boolean): HostAPI
typings.1729365000typings.-1531650254
Method PropertyFluent DescriptionRepresentation
offhand accepts
Return Value

Sets the current title to the given text
The text is given as json

overload 1:
HostAPI.title(text: String): HostAPI
typings.-1808118735typings.-1531650254
Method PropertyFluent DescriptionRepresentation
text accepts
Return Value

Sets the duration of the title on the screen, also its fade-in and fade-out durations

overload 1:
HostAPI.titleTimes(timesData: Vector3): HostAPI
typings.2002444080typings.-1531650254
Method PropertyFluent DescriptionRepresentation
timesData accepts
Return Value
overload 2:
HostAPI.titleTimes(fadeInTime: Integer, stayTime: Integer, fadeOutTime: Integer): HostAPI
typings.-672261858typings.-672261858typings.-672261858typings.-1531650254
Method PropertyFluent DescriptionRepresentation
fadeInTime accepts
stayTime accepts
fadeOutTime accepts
Return Value

Write a warning directly to the minecraft log,
allowing for logging debug data without filling chat

overload 1:
HostAPI.warnToLog(string: String): nil
typings.-1808118735typings.109073
Method PropertyFluent DescriptionRepresentation
string accepts
Return Value

Write directly to the minecraft log, allowing for
logging debug data without filling chat

overload 1:
HostAPI.writeToLog(string: String): nil
typings.-1808118735typings.109073
Method PropertyFluent DescriptionRepresentation
string accepts
Return Value

Setting this value to true will unlock your cursor, letting you move it freely on the screen instead of it controlling your player's rotation

field signature:
HostAPI.unlockCursor: Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Field Type