AdventureSettingsPacket
extends DataPacket
in package
implements
ClientboundPacket, ServerboundPacket
Interfaces, Classes, Traits and Enums
Table of Contents
- ALLOW_FLIGHT = 0x40
- ATTACK_MOBS = 0x10 | self::BITFLAG_SECOND_SET
- ATTACK_PLAYERS = 0x8 | self::BITFLAG_SECOND_SET
- AUTO_JUMP = 0x20
- BITFLAG_SECOND_SET = 1 << 16
- This constant is used to identify flags that should be set on the second field. In a sensible world, these flags would all be set on the same packet field, but as of MCPE 1.2, the new abilities flags have for some reason been assigned a separate field.
- BUILD = 0x100 | self::BITFLAG_SECOND_SET
- DEFAULT = 0x200 | self::BITFLAG_SECOND_SET
- DOORS_AND_SWITCHES = 0x2 | self::BITFLAG_SECOND_SET
- FLYING = 0x200
- MINE = 0x1 | self::BITFLAG_SECOND_SET
- MUTED = 0x400
- NETWORK_ID = \pocketmine\network\mcpe\protocol\ProtocolInfo::ADVENTURE_SETTINGS_PACKET
- NO_CLIP = 0x80
- NO_PVP = 0x2
- OPEN_CONTAINERS = 0x4 | self::BITFLAG_SECOND_SET
- OPERATOR = 0x20 | self::BITFLAG_SECOND_SET
- PERMISSION_ADMIN = 4
- PERMISSION_AUTOMATION = 3
- PERMISSION_HOST = 2
- PERMISSION_NORMAL = 0
- PERMISSION_OPERATOR = 1
- PID_MASK = 0x3ff
- TELEPORT = 0x80 | self::BITFLAG_SECOND_SET
- WORLD_BUILDER = 0x100
- WORLD_IMMUTABLE = 0x1
- RECIPIENT_SUBCLIENT_ID_SHIFT = 12
- SENDER_SUBCLIENT_ID_SHIFT = 10
- SUBCLIENT_ID_MASK = 0x3
- $commandPermission : int
- $customFlags : int
- $flags : int
- $flags2 : int
- $playerPermission : int
- $recipientSubId : int
- $senderSubId : int
- $targetActorUniqueId : int
- __get() : mixed
- __set() : void
- canBeSentBeforeLogin() : bool
- create() : self
- decode() : void
- encode() : void
- getFlag() : bool
- getName() : string
- handle() : bool
- pid() : int
- setFlag() : void
- decodeHeader() : void
- decodePayload() : void
- Decodes the packet body, without the packet ID or other generic header fields.
- encodeHeader() : void
- encodePayload() : void
- Encodes the packet body, without the packet ID or other generic header fields.
Constants
ALLOW_FLIGHT
public
mixed
ALLOW_FLIGHT
= 0x40
ATTACK_MOBS
public
mixed
ATTACK_MOBS
= 0x10 | self::BITFLAG_SECOND_SET
ATTACK_PLAYERS
public
mixed
ATTACK_PLAYERS
= 0x8 | self::BITFLAG_SECOND_SET
AUTO_JUMP
public
mixed
AUTO_JUMP
= 0x20
BITFLAG_SECOND_SET
This constant is used to identify flags that should be set on the second field. In a sensible world, these flags would all be set on the same packet field, but as of MCPE 1.2, the new abilities flags have for some reason been assigned a separate field.
public
mixed
BITFLAG_SECOND_SET
= 1 << 16
BUILD
public
mixed
BUILD
= 0x100 | self::BITFLAG_SECOND_SET
DEFAULT
public
mixed
DEFAULT
= 0x200 | self::BITFLAG_SECOND_SET
DOORS_AND_SWITCHES
public
mixed
DOORS_AND_SWITCHES
= 0x2 | self::BITFLAG_SECOND_SET
FLYING
public
mixed
FLYING
= 0x200
MINE
public
mixed
MINE
= 0x1 | self::BITFLAG_SECOND_SET
MUTED
public
mixed
MUTED
= 0x400
NETWORK_ID
public
mixed
NETWORK_ID
= \pocketmine\network\mcpe\protocol\ProtocolInfo::ADVENTURE_SETTINGS_PACKET
NO_CLIP
public
mixed
NO_CLIP
= 0x80
NO_PVP
public
mixed
NO_PVP
= 0x2
OPEN_CONTAINERS
public
mixed
OPEN_CONTAINERS
= 0x4 | self::BITFLAG_SECOND_SET
OPERATOR
public
mixed
OPERATOR
= 0x20 | self::BITFLAG_SECOND_SET
PERMISSION_ADMIN
public
mixed
PERMISSION_ADMIN
= 4
PERMISSION_AUTOMATION
public
mixed
PERMISSION_AUTOMATION
= 3
PERMISSION_HOST
public
mixed
PERMISSION_HOST
= 2
PERMISSION_NORMAL
public
mixed
PERMISSION_NORMAL
= 0
PERMISSION_OPERATOR
public
mixed
PERMISSION_OPERATOR
= 1
PID_MASK
public
mixed
PID_MASK
= 0x3ff
TELEPORT
public
mixed
TELEPORT
= 0x80 | self::BITFLAG_SECOND_SET
WORLD_BUILDER
public
mixed
WORLD_BUILDER
= 0x100
WORLD_IMMUTABLE
public
mixed
WORLD_IMMUTABLE
= 0x1
RECIPIENT_SUBCLIENT_ID_SHIFT
private
mixed
RECIPIENT_SUBCLIENT_ID_SHIFT
= 12
SENDER_SUBCLIENT_ID_SHIFT
private
mixed
SENDER_SUBCLIENT_ID_SHIFT
= 10
SUBCLIENT_ID_MASK
private
mixed
SUBCLIENT_ID_MASK
= 0x3
Properties
$commandPermission
public
int
$commandPermission
= self::PERMISSION_NORMAL
$customFlags
public
int
$customFlags
= 0
$flags
public
int
$flags
= 0
$flags2
public
int
$flags2
= -1
$playerPermission
public
int
$playerPermission
= \pocketmine\network\mcpe\protocol\types\PlayerPermissions::MEMBER
$recipientSubId
public
int
$recipientSubId
= 0
$senderSubId
public
int
$senderSubId
= 0
$targetActorUniqueId
public
int
$targetActorUniqueId
Methods
__get()
public
__get(string $name) : mixed
Parameters
- $name : string
Return values
mixed —__set()
public
__set(string $name, mixed $value) : void
Parameters
- $name : string
- $value : mixed
Return values
void —canBeSentBeforeLogin()
public
canBeSentBeforeLogin() : bool
Return values
bool —create()
public
static create(int $flags, int $commandPermission, int $flags2, int $playerPermission, int $customFlags, int $targetActorUniqueId) : self
Parameters
- $flags : int
- $commandPermission : int
- $flags2 : int
- $playerPermission : int
- $customFlags : int
- $targetActorUniqueId : int
Tags
Return values
self —decode()
public
final decode(PacketSerializer $in) : void
Parameters
- $in : PacketSerializer
Tags
Return values
void —encode()
public
final encode(PacketSerializer $out) : void
Parameters
- $out : PacketSerializer
Return values
void —getFlag()
public
getFlag(int $flag) : bool
Parameters
- $flag : int
Return values
bool —getName()
public
getName() : string
Return values
string —handle()
public
handle(PacketHandlerInterface $handler) : bool
Parameters
- $handler : PacketHandlerInterface
Return values
bool —pid()
public
pid() : int
Return values
int —setFlag()
public
setFlag(int $flag, bool $value) : void
Parameters
- $flag : int
- $value : bool
Return values
void —decodeHeader()
protected
decodeHeader(PacketSerializer $in) : void
Parameters
- $in : PacketSerializer
Tags
Return values
void —decodePayload()
Decodes the packet body, without the packet ID or other generic header fields.
protected
decodePayload(PacketSerializer $in) : void
Parameters
- $in : PacketSerializer
Return values
void —encodeHeader()
protected
encodeHeader(PacketSerializer $out) : void
Parameters
- $out : PacketSerializer
Return values
void —encodePayload()
Encodes the packet body, without the packet ID or other generic header fields.
protected
encodePayload(PacketSerializer $out) : void
Parameters
- $out : PacketSerializer