Documentation

AdventureSettingsPacket extends DataPacket
in package
implements ClientboundPacket, ServerboundPacket

Interfaces, Classes, Traits and Enums

ClientboundPacket
ServerboundPacket

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

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

NETWORK_ID

public mixed NETWORK_ID = \pocketmine\network\mcpe\protocol\ProtocolInfo::ADVENTURE_SETTINGS_PACKET

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

$playerPermission

public int $playerPermission = \pocketmine\network\mcpe\protocol\types\PlayerPermissions::MEMBER

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
generate-create-func
Return values
self

getName()

public getName() : string
Return values
string

setFlag()

public setFlag(int $flag, bool $value) : void
Parameters
$flag : int
$value : bool
Return values
void

Search results