From 7f09a2a26ebaba2d3edb574e8ea56c906dde9340 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Thu, 27 Apr 2017 14:28:31 +0100 Subject: [PATCH] Added Announcement type to TextPacket --- src/pocketmine/network/mcpe/protocol/TextPacket.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/pocketmine/network/mcpe/protocol/TextPacket.php b/src/pocketmine/network/mcpe/protocol/TextPacket.php index f0c4d39d6..a0a42515f 100644 --- a/src/pocketmine/network/mcpe/protocol/TextPacket.php +++ b/src/pocketmine/network/mcpe/protocol/TextPacket.php @@ -36,6 +36,7 @@ class TextPacket extends DataPacket{ const TYPE_TIP = 4; const TYPE_SYSTEM = 5; const TYPE_WHISPER = 6; + const TYPE_ANNOUNCEMENT = 7; public $type; public $source; @@ -47,8 +48,9 @@ class TextPacket extends DataPacket{ switch($this->type){ case self::TYPE_POPUP: case self::TYPE_CHAT: - /** @noinspection PhpMissingBreakStatementInspection */ case self::TYPE_WHISPER: + /** @noinspection PhpMissingBreakStatementInspection */ + case self::TYPE_ANNOUNCEMENT: $this->source = $this->getString(); case self::TYPE_RAW: case self::TYPE_TIP: @@ -71,8 +73,9 @@ class TextPacket extends DataPacket{ switch($this->type){ case self::TYPE_POPUP: case self::TYPE_CHAT: - /** @noinspection PhpMissingBreakStatementInspection */ case self::TYPE_WHISPER: + /** @noinspection PhpMissingBreakStatementInspection */ + case self::TYPE_ANNOUNCEMENT: $this->putString($this->source); case self::TYPE_RAW: case self::TYPE_TIP: