Phpcraft
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Phpcraft\Packet\ClientboundAbilitiesPacket Class Reference
Inheritance diagram for Phpcraft\Packet\ClientboundAbilitiesPacket:
Inheritance graph
[legend]
Collaboration diagram for Phpcraft\Packet\ClientboundAbilitiesPacket:
Collaboration graph
[legend]

Public Member Functions

 send (Connection $con)
 
 __toString ()
 

Static Public Member Functions

static read (Connection $con)
 

Public Attributes

 $invulnerable = false
 
 $flying = false
 
 $can_fly = false
 
 $instant_breaking = false
 
 $fly_speed = 0.05
 
 $walk_speed = 0.1
 

Member Function Documentation

◆ __toString()

Phpcraft\Packet\ClientboundAbilitiesPacket::__toString ( )

Reimplemented from Phpcraft\Packet\Packet.

◆ read()

static Phpcraft\Packet\ClientboundAbilitiesPacket::read ( Connection  $con)
static

Initialises the packet class by reading its payload from the given Connection.

Parameters
Connection$con
Returns
ClientboundAbilitiesPacket
Exceptions
IOException

Reimplemented from Phpcraft\Packet\Packet.

◆ send()

Phpcraft\Packet\ClientboundAbilitiesPacket::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.

Parameters
Connection$con
Returns
void
Exceptions
IOException

Reimplemented from Phpcraft\Packet\Packet.

Member Data Documentation

◆ $can_fly

boolean Phpcraft\Packet\ClientboundAbilitiesPacket::$can_fly = false

◆ $fly_speed

float Phpcraft\Packet\ClientboundAbilitiesPacket::$fly_speed = 0.05

◆ $flying

boolean Phpcraft\Packet\ClientboundAbilitiesPacket::$flying = false

◆ $instant_breaking

boolean Phpcraft\Packet\ClientboundAbilitiesPacket::$instant_breaking = false

◆ $invulnerable

boolean Phpcraft\Packet\ClientboundAbilitiesPacket::$invulnerable = false

◆ $walk_speed

float Phpcraft\Packet\ClientboundAbilitiesPacket::$walk_speed = 0.1