13declare(strict_types=1);
15namespace pocketmine\network\mcpe\protocol;
17use pmmp\encoding\ByteBufferReader;
18use pmmp\encoding\ByteBufferWriter;
19use pmmp\encoding\VarInt;
23 public const NETWORK_ID = ProtocolInfo::SHOW_CREDITS_PACKET;
25 public const STATUS_START_CREDITS = 0;
26 public const STATUS_END_CREDITS = 1;
28 public int $playerActorRuntimeId;
34 public static function create(
int $playerActorRuntimeId,
int $status) : self{
36 $result->playerActorRuntimeId = $playerActorRuntimeId;
37 $result->status = $status;
42 $this->playerActorRuntimeId =
CommonTypes::getActorRuntimeId($in);
43 $this->status = VarInt::readSignedInt($in);
47 CommonTypes::putActorRuntimeId($out, $this->playerActorRuntimeId);
48 VarInt::writeSignedInt($out, $this->status);
52 return $handler->handleShowCredits($this);
decodePayload(ByteBufferReader $in)
encodePayload(ByteBufferWriter $out)
static create(int $playerActorRuntimeId, int $status)
handle(PacketHandlerInterface $handler)