GenisysPro  for Minecraft PE/Windows 10 v1.1.x
Feature-rich server software for Minecraft PE and Windows 10 Edition
PlayerListPacket Class Reference

Public Member Functions

 clean ()
 
 decode ()
 
 encode ()
 
 getName ()
 
- Public Member Functions inherited from DataPacket
 pid ()
 
 encode ()
 
 decode ()
 
 reset ()
 
 clean ()
 
 __debugInfo ()
 
 getEntityMetadata (bool $types=true)
 
 putEntityMetadata (array $metadata)
 
 getName ()
 
- Public Member Functions inherited from BinaryStream
 __construct ($buffer="", $offset=0)
 
 reset ()
 
 setBuffer ($buffer=null, $offset=0)
 
 getOffset ()
 
 getBuffer ()
 
 get ($len)
 
 put ($str)
 
 getBool ()
 
 putBool ($v)
 
 getLong ()
 
 putLong ($v)
 
 getInt ()
 
 putInt ($v)
 
 getLLong ()
 
 putLLong ($v)
 
 getLInt ()
 
 putLInt ($v)
 
 getSignedShort ()
 
 putShort ($v)
 
 getShort ()
 
 putSignedShort ($v)
 
 getFloat (int $accuracy=-1)
 
 putFloat ($v)
 
 getLShort ($signed=true)
 
 putLShort ($v)
 
 getLFloat (int $accuracy=-1)
 
 putLFloat ($v)
 
 getTriad ()
 
 putTriad ($v)
 
 getLTriad ()
 
 putLTriad ($v)
 
 getByte ()
 
 putByte ($v)
 
 getUUID ()
 
 putUUID (UUID $uuid)
 
 getSlot ()
 
 putSlot (Item $item)
 
 getString ()
 
 putString ($v)
 
 getUnsignedVarInt ()
 
 putUnsignedVarInt ($v)
 
 getVarInt ()
 
 putVarInt ($v)
 
 getEntityId ()
 
 putEntityId ($v)
 
 getBlockCoords (&$x, &$y, &$z)
 
 putBlockCoords ($x, $y, $z)
 
 getVector3f (&$x, &$y, &$z)
 
 putVector3f ($x, $y, $z)
 
 feof ()
 

Data Fields

const NETWORK_ID = ProtocolInfo::PLAYER_LIST_PACKET
 
const TYPE_ADD = 0
 
const TYPE_REMOVE = 1
 
 $entries = []
 
 $type
 
- Data Fields inherited from DataPacket
const NETWORK_ID = 0
 
 $isEncoded = false
 
- Data Fields inherited from BinaryStream
 $offset
 
 $buffer
 

Member Function Documentation

◆ clean()

clean ( )
Returns
$this
42  {
43  $this->entries = [];
44 
45  return parent::clean();
46  }

◆ decode()

decode ( )
51  {
52 
53  }

◆ encode()

encode ( )
58  {
59  $this->reset();
60  $this->putByte($this->type);
61  $this->putUnsignedVarInt(count($this->entries));
62  foreach($this->entries as $d){
63  if($this->type === self::TYPE_ADD){
64  $this->putUUID($d[0]);
65  $this->putEntityId($d[1]);
66  $this->putString($d[2]);
67  $this->putString($d[3]);
68  $this->putString($d[4]);
69  }else{
70  $this->putUUID($d[0]);
71  }
72  }
73  }

◆ getName()

getName ( )
Returns
PacketName|string
78  {
79  return "PlayerListPacket";
80  }

Field Documentation

◆ $entries

$entries = []

◆ $type

$type

◆ NETWORK_ID

◆ TYPE_ADD

const TYPE_ADD = 0

◆ TYPE_REMOVE

const TYPE_REMOVE = 1

The documentation for this class was generated from the following file: