13declare(strict_types=1);
15namespace pocketmine\network\mcpe\protocol;
20 public const NETWORK_ID = ProtocolInfo::MULTIPLAYER_SETTINGS_PACKET;
22 public const ACTION_ENABLE_MULTIPLAYER = 0;
23 public const ACTION_DISABLE_MULTIPLAYER = 1;
24 public const ACTION_REFRESH_JOIN_CODE = 2;
31 public static function create(
int $action) : self{
33 $result->action = $action;
37 public function getAction() : int{
42 $this->action = $in->getVarInt();
46 $out->putVarInt($this->action);
50 return $handler->handleMultiplayerSettings($this);
decodePayload(PacketSerializer $in)
static create(int $action)
encodePayload(PacketSerializer $out)
handle(PacketHandlerInterface $handler)