Phpcraft
Public Member Functions | Static Public Member Functions | Static Protected Member Functions | Static Protected Attributes | List of all members
Phpcraft\Packet\ServerboundPacketId Class Reference
Inheritance diagram for Phpcraft\Packet\ServerboundPacketId:
Inheritance graph
[legend]
Collaboration diagram for Phpcraft\Packet\ServerboundPacketId:
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 server.

Member Function Documentation

◆ get()

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

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

Parameters
string$name
Returns
ServerboundPacketId|null

Reimplemented from Phpcraft\Identifier.

◆ getClass()

Phpcraft\Packet\ServerboundPacketId::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\ServerboundPacketId::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\ServerboundPacketId::nameMap ( )
staticprotected
Returns
array<string,string>

Reimplemented from Phpcraft\Packet\PacketId.

◆ populateAllCache()

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

Reimplemented from Phpcraft\Packet\PacketId.

Member Data Documentation

◆ $all_cache

Phpcraft\Packet\ServerboundPacketId::$all_cache
staticprotected