mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-16 18:59:00 +00:00
Changed TextPacket
This commit is contained in:
parent
0f993f8beb
commit
8889e687c9
@ -32,6 +32,7 @@ class TextPacket extends DataPacket{
|
|||||||
const TYPE_TRANSLATION = 2;
|
const TYPE_TRANSLATION = 2;
|
||||||
const TYPE_POPUP = 3;
|
const TYPE_POPUP = 3;
|
||||||
const TYPE_TIP = 4;
|
const TYPE_TIP = 4;
|
||||||
|
const TYPE_SYSTEM = 5;
|
||||||
|
|
||||||
public $type;
|
public $type;
|
||||||
public $source;
|
public $source;
|
||||||
@ -46,6 +47,7 @@ class TextPacket extends DataPacket{
|
|||||||
$this->source = $this->getString();
|
$this->source = $this->getString();
|
||||||
case self::TYPE_RAW:
|
case self::TYPE_RAW:
|
||||||
case self::TYPE_TIP:
|
case self::TYPE_TIP:
|
||||||
|
case self::TYPE_SYSTEM:
|
||||||
$this->message = $this->getString();
|
$this->message = $this->getString();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -62,11 +64,12 @@ class TextPacket extends DataPacket{
|
|||||||
$this->reset();
|
$this->reset();
|
||||||
$this->putByte($this->type);
|
$this->putByte($this->type);
|
||||||
switch($this->type){
|
switch($this->type){
|
||||||
|
case self::TYPE_POPUP:
|
||||||
case self::TYPE_CHAT:
|
case self::TYPE_CHAT:
|
||||||
$this->putString($this->source);
|
$this->putString($this->source);
|
||||||
case self::TYPE_RAW:
|
case self::TYPE_RAW:
|
||||||
case self::TYPE_POPUP:
|
|
||||||
case self::TYPE_TIP:
|
case self::TYPE_TIP:
|
||||||
|
case self::TYPE_SYSTEM:
|
||||||
$this->putString($this->message);
|
$this->putString($this->message);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user