13declare(strict_types=1);
15namespace pocketmine\network\mcpe\protocol;
20 public const NETWORK_ID = ProtocolInfo::STOP_SOUND_PACKET;
22 public string $soundName;
24 public bool $stopLegacyMusic;
29 public static function create(
string $soundName,
bool $stopAll,
bool $stopLegacyMusic) : self{
31 $result->soundName = $soundName;
32 $result->stopAll = $stopAll;
33 $result->stopLegacyMusic = $stopLegacyMusic;
38 $this->soundName = $in->getString();
39 $this->stopAll = $in->
getBool();
40 $this->stopLegacyMusic = $in->
getBool();
44 $out->putString($this->soundName);
45 $out->putBool($this->stopAll);
46 $out->putBool($this->stopLegacyMusic);
50 return $handler->handleStopSound($this);
encodePayload(PacketSerializer $out)
static create(string $soundName, bool $stopAll, bool $stopLegacyMusic)
handle(PacketHandlerInterface $handler)
decodePayload(PacketSerializer $in)