effect
send packet <name> to <who>HyperPacketsSends that packet to a player, or to all players
send packet "change game state" with "win game", 1 to player← All of the Docs HyperPackets
send packet <name> to <who>HyperPacketsSends that packet to a player, or to all players
send packet "change game state" with "win game", 1 to playersend packet <name> with <value>, <value> to <who>HyperPacketsWith the values the packet takes, in its order
send packet "change game state" with "win game", 1 to playerpacket namesHyperPacketsEvery packet there is, as a list
| Syntax | What it does |
|---|---|
send packet <name> to <who> | Sends that packet to a player, or to all players |
send packet <name> with <value>, <value> to <who> | With the values the packet takes, in its order |
packet names | Every packet there is, as a list |
The packets are PacketEvents' own, about 160 of them, and are named as it names them: "ChangeGameState", "EntityAnimation", "SetTitleText". Spaces and capitals do not matter, so "change game state" is the same.
/hyperpackets lists them all, and /hyperpackets <name> says what one takes:
/hyperpackets entity animation
EntityAnimation takes, in this order:
whole number, one of swing_main_arm/hurt/wake_up/swing_off_hand/critical_hit/magic_critical_hit
What a script gives is turned into what the packet asks for:
| The packet asks for | Give it |
|---|---|
| a whole number, a number | A number. Where it is the number of an entity, a player or an entity can be given instead: player |
| true/false | true or false |
| text | A text; colours with & work where the packet shows it |
| one of ... | One of the words listed, as text: "swing main arm" |
| a place | A location, or three numbers as a list: [0, 1, 0] |
| UUID | A player or an entity |
| ItemStack | The name of an item: "diamond sword" |
| a list of something | Several values of that kind, as a list or one after another |
command /swing:
trigger:
send packet "entity animation" with player, "swing main arm" to all players
command /credits:
trigger:
send packet "change game state" with "win game", 1 to player