13declare(strict_types=1);
15namespace pocketmine\network\mcpe\protocol;
20 public const NETWORK_ID = ProtocolInfo::EMOTE_PACKET;
22 public const FLAG_SERVER = 1 << 0;
23 public const FLAG_MUTE_ANNOUNCEMENT = 1 << 1;
25 private int $actorRuntimeId;
26 private string $emoteId;
27 private string $xboxUserId;
28 private string $platformChatId;
34 public static function create(
int $actorRuntimeId,
string $emoteId,
string $xboxUserId,
string $platformChatId,
int $flags) : self{
36 $result->actorRuntimeId = $actorRuntimeId;
37 $result->emoteId = $emoteId;
38 $result->xboxUserId = $xboxUserId;
39 $result->platformChatId = $platformChatId;
40 $result->flags = $flags;
44 public function getActorRuntimeId() : int{
45 return $this->actorRuntimeId;
48 public function getEmoteId() : string{
49 return $this->emoteId;
52 public function getXboxUserId() : string{ return $this->xboxUserId; }
54 public function getPlatformChatId() : string{ return $this->platformChatId; }
56 public function getFlags() : int{
61 $this->actorRuntimeId = $in->getActorRuntimeId();
69 $out->putActorRuntimeId($this->actorRuntimeId);
70 $out->putString($this->emoteId);
71 $out->putString($this->xboxUserId);
72 $out->putString($this->platformChatId);
73 $out->putByte($this->flags);
77 return $handler->handleEmote($this);
encodePayload(PacketSerializer $out)
decodePayload(PacketSerializer $in)
static create(int $actorRuntimeId, string $emoteId, string $xboxUserId, string $platformChatId, int $flags)
handle(PacketHandlerInterface $handler)