packet
This page will go over the Packet API namespace.
sendKeepAlive(key): Undefined
sendKeepAlive(key): Undefined
key
Number
The keepalive key.
Sends a C00 KeepAlive.
sendMessage(msg): Undefined
sendMessage(msg): Undefined
msg
String
The message to send.
Sends a C01 ChatMessage.
sendUseEntity(entity, action): Undefined
sendUseEntity(entity, action): Undefined
entity
The entity.
action
The value of C02PacketUseEntity.Action enum
if string, hitvec otherwise.
Sends a C02 UseEntity.
sendPosition(x, y, z, yaw, pitch, ground): Undefined
sendPosition(x, y, z, yaw, pitch, ground): Undefined
x?
Number
X position. Must be present alongside Y and Z parameters.
y?
Number
Y position. Must be present alongside X and Z parameters.
z?
Number
Z position. Must be present alongside X and Y parameters.
yaw?
Number
Yaw angle rotation. Must be present alongside X, Y, Z and Pitch parameters.
pitch?
Number
Pitch angle rotation. Must be present alongside X, Y, Z and Yaw parameters.
ground
Boolean
Whether the player is on ground. Required parameter
Sends a C03/C04/C06 Packet. The following method overloads exist: sendPosition(x, y, z, ground); sendPosition(x, y, z, yaw, pitch, ground); sendPosition(ground)
sendDigging(enumStatus, pos, enumFacing): Undefined
sendDigging(enumStatus, pos, enumFacing): Undefined
enumStatus
string
The C07PacketPlayerDigging.Action enum
.
pos
Block position.
enumFacing
string
The EnumFacing enum
value
Sends a C07 PlayerDigging.
sendPlacement(pos, direction, x, y, z): Undefined
sendPlacement(pos, direction, x, y, z): Undefined
pos
The placement position.
direction
Number
The EnumFacing index.
x
Number
Facing X.
y
Number
Facing Y.
z
Number
Facing Z.
Sends a C08 PlayerBlockPlacement.
sendChangeItem(slot): Undefined
sendChangeItem(slot): Undefined
slot
Number
The new slot to switch to.
Sends a C09 HeldItemChange.
sendEntityAction(entityId, action): Undefined
sendEntityAction(entityId, action): Undefined
entityId
Number
The ID of an entity.
action
string
The value of C0BPacketEntityAction.Action enum
.
Sends a C0B EntityAction.
sendInput(strafeSpeed, forwardSpeed, jumping, sneaking): Undefined
sendInput(strafeSpeed, forwardSpeed, jumping, sneaking): Undefined
strafeSpeed
Number
The player's strafe speed.
forwardSpeed
Number
The player's forward speed.
jumping
Boolean
Whether the player is jumping.
sneaking
Boolean
Whether the player is sneaking.
Sends a C0C Input.
sendCloseWindow(id): Undefined
sendCloseWindow(id): Undefined
id
Number
The window ID. This parameter is optional.
Sends a C0D CloseWindow.
sendEnchantItem(window, enchantment): Undefined
sendEnchantItem(window, enchantment): Undefined
id
Number
The window ID. This parameter is optional.
enchantment
Number
The enchantment ID.
Sends a C11 EnchantItem.
sendTransaction(window, uid, accepted): Undefined
sendTransaction(window, uid, accepted): Undefined
window
Number
The window ID.
uid
Number
The transaction ID.
accepted
Boolean
The transaction's accepted
field.
Sends a C0F ConfirmTransaction.
sendAbilities(flying, allowFlying, creativeMode): Undefined
sendAbilities(flying, allowFlying, creativeMode): Undefined
flying
Boolean
Whether the player is flying. This parameter is optional.
allowFlying
Boolean
Whether the player can be flying. This parameter is optional.
creativeMode
Boolean
Whether the player is in creative. This parameter is optional.
Sends a C13 PlayerAbilities. With no parameters supplied, this will send the player's current abilities.
sendTabComplete(msg, pos): Undefined
sendTabComplete(msg, pos): Undefined
msg
string
The message.
pos
The position.
Sends a C14 TabComplete.
sendStatus(status): Undefined
sendStatus(status): Undefined
status
string
The value of C16PacketClientStatus.EnumState
Sends a C16 ClientStatus.
sendSettings(): Undefined
sendSettings(): Undefined
Sends a C15 ClientSettings.
Last updated