|
Phpcraft
|


Public Member Functions | |
| __construct (int $window=0, int $slotId=0, ?Slot $slot=null) | |
| send (Connection $con) | |
| __toString () | |
Static Public Member Functions | |
| static | read (Connection $con) |
Public Attributes | |
| $window | |
| $slotId | |
| $slot | |
| Phpcraft\Packet\SetSlotPacket::__construct | ( | int | $window = 0, |
| int | $slotId = 0, |
||
| ?Slot | $slot = null |
||
| ) |
| int | $window | The ID of the window being updated. 0 for inventory. |
| int | $slotId | The ID of the slot being updated. See https://wiki.vg/Inventory and Slot constants. |
| Slot | null | $slot | The new value of the slot. |
| Phpcraft\Packet\SetSlotPacket::__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\SetSlotPacket::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 | |
| MissingMetadataException |
Reimplemented from Phpcraft\Packet\Packet.
| Slot null Phpcraft\Packet\SetSlotPacket::$slot |
The new value of the slot.
| int Phpcraft\Packet\SetSlotPacket::$slotId |
The ID of the slot being updated.
| int Phpcraft\Packet\SetSlotPacket::$window |
The ID of the window being updated. 0 for inventory.
1.8.17