General - New Packet (Expression) — PacketEventsSK

Addon: PacketEventsSK · Category: Expression · Since: 1.0.0, 1.1.0 (changed to SectionExpression) and large changes

Syntax

[a] [new] %*packettype%

Description

Create a new packet from a packet type.

### Available Packets and their fields * **open sign editor** fields: - `block position (block pos, position, pos)` - `sign side (side)` * **update sign** fields: - `location vector (location)` - `sign lines (lines)` - `sign side (side)` * **block change** fields: - `block position (block pos, position, pos)` - `block state (state, block data, data)` * **select bundle item** fields: - `slot id (id)` - `selected item index (selected index, item index, index)` * **entity velocity** fields: - `entity id (id)` - `velocity vector (vector, velocity)` * **game test highlight pos** fields: - `absolute position (absolute pos, abs position, abs pos, position, pos)` - `relative position (relative pos, rel position, rel pos)` * **interact entity** fields: - `entity id (id)` - `interaction hand (hand)` - `location vector (location, loc)` - `sneaking state (sneaking)` * **destroy entities** fields: - `entity ids (ids)` * **entity metadata** fields: - `entity id (id)` - `entity metadata (entity meta, metadata, meta)`

Examples

command killTargetForMe:
    trigger:
        set {_packet} to a new clientbound destroy entities packet:
            entity ids: protocol id of target entity

        silently send packet {_packet} to the player

View source