packet
This page will go over the Packet API namespace.
sendKeepAlive(key): Undefined
sendKeepAlive(key): Undefined
Argument | Type | Description |
---|---|---|
|
| The keepalive key. |
Sends a C00 KeepAlive.
sendMessage(msg): Undefined
sendMessage(msg): Undefined
Argument | Type | Description |
---|---|---|
|
| The message to send. |
Sends a C01 ChatMessage.
sendUseEntity(entity, action): Undefined
sendUseEntity(entity, action): Undefined
Argument | Type | Description |
---|---|---|
|
| The entity. |
|
| The value of C02PacketUseEntity.Action |
Sends a C02 UseEntity.
sendPosition(x, y, z, yaw, pitch, ground): Undefined
sendPosition(x, y, z, yaw, pitch, ground): Undefined
Argument | Type | Description |
---|---|---|
|
| X position. Must be present alongside Y and Z parameters. |
|
| Y position. Must be present alongside X and Z parameters. |
|
| Z position. Must be present alongside X and Y parameters. |
|
| Yaw angle rotation. Must be present alongside X, Y, Z and Pitch parameters. |
|
| Pitch angle rotation. Must be present alongside X, Y, Z and Yaw parameters. |
|
| 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
Argument | Type | Description |
---|---|---|
|
| The C07PacketPlayerDigging.Action |
| Block position. | |
|
| The EnumFacing |
Sends a C07 PlayerDigging.
sendPlacement(pos, direction, x, y, z): Undefined
sendPlacement(pos, direction, x, y, z): Undefined
Argument | Type | Description |
---|---|---|
| The placement position. | |
|
| The EnumFacing index. |
|
| Facing X. |
|
| Facing Y. |
|
| Facing Z. |
Sends a C08 PlayerBlockPlacement.
sendChangeItem(slot): Undefined
sendChangeItem(slot): Undefined
Argument | Type | Description |
---|---|---|
|
| The new slot to switch to. |
Sends a C09 HeldItemChange.
sendEntityAction(entityId, action): Undefined
sendEntityAction(entityId, action): Undefined
Argument | Type | Description |
---|---|---|
|
| The ID of an entity. |
|
| The value of C0BPacketEntityAction.Action |
Sends a C0B EntityAction.
sendInput(strafeSpeed, forwardSpeed, jumping, sneaking): Undefined
sendInput(strafeSpeed, forwardSpeed, jumping, sneaking): Undefined
Argument | Type | Description |
---|---|---|
|
| The player's strafe speed. |
|
| The player's forward speed. |
|
| Whether the player is jumping. |
|
| Whether the player is sneaking. |
Sends a C0C Input.
sendCloseWindow(id): Undefined
sendCloseWindow(id): Undefined
Argument | Type | Description |
---|---|---|
|
| The window ID. This parameter is optional. |
Sends a C0D CloseWindow.
sendEnchantItem(window, enchantment): Undefined
sendEnchantItem(window, enchantment): Undefined
Argument | Type | Description |
---|---|---|
|
| The window ID. This parameter is optional. |
|
| The enchantment ID. |
Sends a C11 EnchantItem.
sendTransaction(window, uid, accepted): Undefined
sendTransaction(window, uid, accepted): Undefined
Argument | Type | Description |
---|---|---|
|
| The window ID. |
|
| The transaction ID. |
|
| The transaction's |
Sends a C0F ConfirmTransaction.
sendAbilities(flying, allowFlying, creativeMode): Undefined
sendAbilities(flying, allowFlying, creativeMode): Undefined
Argument | Type | Description |
---|---|---|
|
| Whether the player is flying. This parameter is optional. |
|
| Whether the player can be flying. This parameter is optional. |
|
| 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
Argument | Type | Description |
---|---|---|
|
| The message. |
| The position. |
Sends a C14 TabComplete.
sendStatus(status): Undefined
sendStatus(status): Undefined
Argument | Type | Description |
---|---|---|
|
| The value of C16PacketClientStatus.EnumState |
Sends a C16 ClientStatus.
sendSettings(): Undefined
sendSettings(): Undefined
Sends a C15 ClientSettings.
Last updated