|
Phpcraft
|


Public Member Functions | |
| __construct (bool $off_hand=false) | |
| send (Connection $con) | |
| __toString () | |
Static Public Member Functions | |
| static | read (Connection $con) |
Public Attributes | |
| $off_hand = false | |
Sent by the client to the server when swinging an arm.
| Phpcraft\Packet\SwingArmPacket::__construct | ( | bool | $off_hand = false | ) |
| bool | $off_hand | True when the offhand is being swung. |
| Phpcraft\Packet\SwingArmPacket::__toString | ( | ) |
Reimplemented from Phpcraft\Packet\Packet.
|
static |
Initialises the packet class by reading its payload from the given Connection.
| Connection | $con |
| IOException |
Reimplemented from Phpcraft\Packet\Packet.
| Phpcraft\Packet\SwingArmPacket::send | ( | Connection | $con | ) |
Adds the packet's ID and payload to the Connection's write buffer and sends it over the wire if the connection has a stream. Note that in some cases this will produce multiple Minecraft packets, therefore you should only use this on connections without a stream if you know what you're doing.
| Connection | $con |
| IOException |
Reimplemented from Phpcraft\Packet\Packet.
| Phpcraft\Packet\SwingArmPacket::$off_hand = false |
1.8.17