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

Public Member Functions

 getId (int $protocol_version)
 
 getClass ()
 
- Public Member Functions inherited from Phpcraft\Packet\PacketId
 getInstance (?Connection $con=null)
 

Static Public Member Functions

static get (string $name)
 
- Static Public Member Functions inherited from Phpcraft\Identifier
static getById (int $id, int $protocol_version)
 
static all ()
 

Static Protected Member Functions

static populateAllCache ()
 
static nameMap ()
 
- Static Protected Member Functions inherited from Phpcraft\Packet\PacketId
static populateAllCache_ (string $key)
 

Static Protected Attributes

static $all_cache
 
- Static Protected Attributes inherited from Phpcraft\Packet\PacketId
static $all_cache
 
- Static Protected Attributes inherited from Phpcraft\Identifier
static $all_cache
 

Additional Inherited Members

- Public Attributes inherited from Phpcraft\Identifier
 $name
 
 $since_protocol_version
 
- Protected Member Functions inherited from Phpcraft\Packet\PacketId
 _getId (int $protocol_version, string $key)
 
- Protected Member Functions inherited from Phpcraft\Identifier
 __construct (string $name, int $since_protocol_version)
 

Detailed Description

The class for the IDs of packets sent to the client.

Member Function Documentation

◆ get()

static Phpcraft\Packet\ClientboundPacketId::get ( string  $name)
static

Returns a ClientboundPacketId by its name or null if not found. If you call ClientboundPacketId::get() instead of PacketId::get() you may drop the leading "clientbound_" from applicable packet ids.

Parameters
string$name
Returns
ClientboundPacketId|null

Reimplemented from Phpcraft\Identifier.

◆ getClass()

Phpcraft\Packet\ClientboundPacketId::getClass ( )

Returns the packet's class or null if the packet does not have a class implementation yet.

Returns
string|null

Reimplemented from Phpcraft\Packet\PacketId.

◆ getId()

Phpcraft\Packet\ClientboundPacketId::getId ( int  $protocol_version)

Returns the ID of this Identifier for the given protocol version or null if not applicable.

Parameters
int$protocol_version
Returns
int|null

Reimplemented from Phpcraft\Identifier.

◆ nameMap()

static Phpcraft\Packet\ClientboundPacketId::nameMap ( )
staticprotected
Returns
array<string,string>

Reimplemented from Phpcraft\Packet\PacketId.

◆ populateAllCache()

static Phpcraft\Packet\ClientboundPacketId::populateAllCache ( )
staticprotected
Returns
void

Reimplemented from Phpcraft\Packet\PacketId.

Member Data Documentation

◆ $all_cache

Phpcraft\Packet\ClientboundPacketId::$all_cache
staticprotected