mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-03 16:45:13 +00:00
Moved network ids to constants, improved some entity methods, more performance
This commit is contained in:
@ -25,8 +25,7 @@ namespace pocketmine\network\protocol;
|
||||
|
||||
|
||||
class TextPacket extends DataPacket{
|
||||
public static $pool = [];
|
||||
public static $next = 0;
|
||||
const NETWORK_ID = Info::TEXT_PACKET;
|
||||
|
||||
const TYPE_RAW = 0;
|
||||
const TYPE_CHAT = 1;
|
||||
@ -39,10 +38,6 @@ class TextPacket extends DataPacket{
|
||||
public $message;
|
||||
public $parameters = [];
|
||||
|
||||
public function pid(){
|
||||
return Info::TEXT_PACKET;
|
||||
}
|
||||
|
||||
public function decode(){
|
||||
$this->type = $this->getByte();
|
||||
switch($this->type){
|
||||
|
Reference in New Issue
Block a user