PocketMine
Player Class Reference
Inheritance diagram for Player:
Human CommandSender InventoryHolder ChunkLoader IPlayer Creature ProjectileSource InventoryHolder Permissible ServerOperator Living ServerOperator Entity Damageable Location Metadatable Position Vector3

Public Member Functions

 getLeaveMessage ()
 
 getClientId ()
 
 getClientSecret ()
 
 isBanned ()
 
 setBanned ($value)
 
 isWhitelisted ()
 
 setWhitelisted ($value)
 
 getPlayer ()
 
 getFirstPlayed ()
 
 getLastPlayed ()
 
 hasPlayedBefore ()
 
 setAllowFlight ($value)
 
 getAllowFlight ()
 
 setAutoJump ($value)
 
 hasAutoJump ()
 
 spawnTo (Player $player)
 
 getServer ()
 
 getRemoveFormat ()
 
 setRemoveFormat ($remove=true)
 
 canSee (Player $player)
 
 hidePlayer (Player $player)
 
 showPlayer (Player $player)
 
 canCollideWith (Entity $entity)
 
 resetFallDistance ()
 
 isOnline ()
 
 isOp ()
 
 setOp ($value)
 
 isPermissionSet ($name)
 
 hasPermission ($name)
 
 addAttachment (Plugin $plugin, $name=null, $value=null)
 
 removeAttachment (PermissionAttachment $attachment)
 
 recalculatePermissions ()
 
 getEffectivePermissions ()
 
 __construct (SourceInterface $interface, $clientID, $ip, $port)
 
 removeAchievement ($achievementId)
 
 hasAchievement ($achievementId)
 
 isConnected ()
 
 getDisplayName ()
 
 setDisplayName ($name)
 
 setSkin ($str, $skinName)
 
 getAddress ()
 
 getPort ()
 
 getNextPosition ()
 
 isSleeping ()
 
 getSpawn ()
 
 sendChunk ($x, $z, $payload, $ordering=FullChunkDataPacket::ORDER_COLUMNS)
 
 batchDataPacket (DataPacket $packet)
 
 dataPacket (DataPacket $packet, $needACK=false)
 
 directDataPacket (DataPacket $packet, $needACK=false)
 
 sleepOn (Vector3 $pos)
 
 setSpawn (Vector3 $pos)
 
 stopSleep ()
 
 awardAchievement ($achievementId)
 
 getGamemode ()
 
 setGamemode ($gm)
 
 sendSettings ()
 
 isSurvival ()
 
 isCreative ()
 
 isSpectator ()
 
 isAdventure ()
 
 getDrops ()
 
 addEntityMotion ($entityId, $x, $y, $z)
 
 addEntityMovement ($entityId, $x, $y, $z, $yaw, $pitch, $headYaw=null)
 
 setDataProperty ($id, $type, $value)
 
 setMotion (Vector3 $mot)
 
 onUpdate ($currentTick)
 
 checkNetwork ()
 
 canInteract (Vector3 $pos, $maxDistance, $maxDiff=0.5)
 
 onPlayerPreLogin ()
 
 tryAuthenticate ()
 
 authenticateCallback ($valid)
 
 kick ($reason="", $isAdmin=true)
 
 sendMessage ($message)
 
 sendTranslation ($message, array $parameters=[])
 
 sendPopup ($message, $subtitle="")
 
 sendTip ($message)
 
 close ($message="", $reason="generic reason", $notify=true)
 
 __debugInfo ()
 
 save ($async=false)
 
 getName ()
 
 kill ()
 
 setHealth ($amount)
 
 attack ($damage, EntityDamageEvent $source)
 
 sendPosition (Vector3 $pos, $yaw=null, $pitch=null, $mode=0, array $targets=null)
 
 teleport (Vector3 $pos, $yaw=null, $pitch=null)
 
 teleportImmediate (Vector3 $pos, $yaw=null, $pitch=null)
 
 getWindowId (Inventory $inventory)
 
 addWindow (Inventory $inventory, $forceId=null)
 
 removeWindow (Inventory $inventory)
 
 setMetadata ($metadataKey, MetadataValue $metadataValue)
 
 getMetadata ($metadataKey)
 
 hasMetadata ($metadataKey)
 
 removeMetadata ($metadataKey, Plugin $plugin)
 
 onChunkChanged (FullChunk $chunk)
 
 onChunkLoaded (FullChunk $chunk)
 
 onChunkPopulated (FullChunk $chunk)
 
 onChunkUnloaded (FullChunk $chunk)
 
 onBlockChanged (Vector3 $block)
 
 getLoaderId ()
 
 isLoaderActive ()
 
- Public Member Functions inherited from Human
 getSkinData ()
 
 getSkinName ()
 
 getUniqueId ()
 
 getRawUniqueId ()
 
 setSkin ($str, $skinName)
 
 getInventory ()
 
 getName ()
 
 getDrops ()
 
 saveNBT ()
 
 spawnTo (Player $player)
 
 despawnFrom (Player $player)
 
 close ()
 
- Public Member Functions inherited from Living
 setHealth ($amount)
 
 saveNBT ()
 
 getName ()
 
 hasLineOfSight (Entity $entity)
 
 heal ($amount, EntityRegainHealthEvent $source)
 
 attack ($damage, EntityDamageEvent $source)
 
 knockBack (Entity $attacker, $damage, $x, $z, $base=0.4)
 
 kill ()
 
 entityBaseTick ($tickDiff=1)
 
 getDrops ()
 
 getLineOfSight ($maxDistance, $maxLength=0, array $transparent=[])
 
 getTargetBlock ($maxDistance, array $transparent=[])
 
- Public Member Functions inherited from Entity
 __construct (FullChunk $chunk, Compound $nbt)
 
 getNameTag ()
 
 isNameTagVisible ()
 
 setNameTag ($name)
 
 setNameTagVisible ($value=true)
 
 isSneaking ()
 
 setSneaking ($value=true)
 
 isSprinting ()
 
 setSprinting ($value=true)
 
 getEffects ()
 
 removeAllEffects ()
 
 removeEffect ($effectId)
 
 getEffect ($effectId)
 
 hasEffect ($effectId)
 
 addEffect (Effect $effect)
 
 getSaveId ()
 
 saveNBT ()
 
 getViewers ()
 
 spawnTo (Player $player)
 
 sendPotionEffects (Player $player)
 
 sendMetadata ($player)
 
 sendData ($player, array $data=null)
 
 despawnFrom (Player $player)
 
 attack ($damage, EntityDamageEvent $source)
 
 heal ($amount, EntityRegainHealthEvent $source)
 
 getHealth ()
 
 isAlive ()
 
 setHealth ($amount)
 
 setLastDamageCause (EntityDamageEvent $type)
 
 getLastDamageCause ()
 
 getMaxHealth ()
 
 setMaxHealth ($amount)
 
 canCollideWith (Entity $entity)
 
 entityBaseTick ($tickDiff=1)
 
 getDirectionVector ()
 
 getDirectionPlane ()
 
 onUpdate ($currentTick)
 
 scheduleUpdate ()
 
 isOnFire ()
 
 setOnFire ($seconds)
 
 getDirection ()
 
 extinguish ()
 
 canTriggerWalking ()
 
 resetFallDistance ()
 
 getBoundingBox ()
 
 fall ($fallDistance)
 
 handleLavaMovement ()
 
 getEyeHeight ()
 
 moveFlying ()
 
 onCollideWithPlayer (Human $entityPlayer)
 
 getPosition ()
 
 getLocation ()
 
 isInsideOfWater ()
 
 isInsideOfSolid ()
 
 fastMove ($dx, $dy, $dz)
 
 move ($dx, $dy, $dz)
 
 getBlocksAround ()
 
 setPositionAndRotation (Vector3 $pos, $yaw, $pitch)
 
 setRotation ($yaw, $pitch)
 
 setPosition (Vector3 $pos)
 
 getMotion ()
 
 setMotion (Vector3 $motion)
 
 isOnGround ()
 
 kill ()
 
 teleport (Vector3 $pos, $yaw=null, $pitch=null)
 
 getId ()
 
 respawnToAll ()
 
 spawnToAll ()
 
 despawnFromAll ()
 
 close ()
 
 setDataProperty ($id, $type, $value)
 
 getDataProperty ($id)
 
 getDataPropertyType ($id)
 
 setDataFlag ($propertyId, $id, $value=true, $type=self::DATA_TYPE_BYTE)
 
 getDataFlag ($propertyId, $id)
 
 setMetadata ($metadataKey, MetadataValue $metadataValue)
 
 getMetadata ($metadataKey)
 
 hasMetadata ($metadataKey)
 
 removeMetadata ($metadataKey, Plugin $plugin)
 
 __toString ()
 
- Public Member Functions inherited from Location
 __construct ($x=0, $y=0, $z=0, $yaw=0.0, $pitch=0.0, Level $level=null)
 
 getYaw ()
 
 getPitch ()
 
 __toString ()
 
- Public Member Functions inherited from Position
 __construct ($x=0, $y=0, $z=0, Level $level=null)
 
 getLevel ()
 
 setLevel (Level $level)
 
 isValid ()
 
 setStrong ()
 
 setWeak ()
 
 getSide ($side, $step=1)
 
 __toString ()
 
 setComponents ($x, $y, $z)
 
- Public Member Functions inherited from Vector3
 __construct ($x=0, $y=0, $z=0)
 
 getX ()
 
 getY ()
 
 getZ ()
 
 getFloorX ()
 
 getFloorY ()
 
 getFloorZ ()
 
 getRight ()
 
 getUp ()
 
 getForward ()
 
 getSouth ()
 
 getWest ()
 
 add ($x, $y=0, $z=0)
 
 subtract ($x=0, $y=0, $z=0)
 
 multiply ($number)
 
 divide ($number)
 
 ceil ()
 
 floor ()
 
 round ()
 
 abs ()
 
 getSide ($side, $step=1)
 
 distance (Vector3 $pos)
 
 distanceSquared (Vector3 $pos)
 
 maxPlainDistance ($x=0, $z=0)
 
 length ()
 
 lengthSquared ()
 
 normalize ()
 
 dot (Vector3 $v)
 
 cross (Vector3 $v)
 
 equals (Vector3 $v)
 
 getIntermediateWithXValue (Vector3 $v, $x)
 
 getIntermediateWithYValue (Vector3 $v, $y)
 
 getIntermediateWithZValue (Vector3 $v, $z)
 
 setComponents ($x, $y, $z)
 
 __toString ()
 
- Public Member Functions inherited from ChunkLoader
 getPosition ()
 
 getX ()
 
 getZ ()
 
 getLevel ()
 

Static Public Member Functions

static getChunkCacheFromData ($chunkX, $chunkZ, $payload, $ordering=FullChunkDataPacket::ORDER_COLUMNS)
 
- Static Public Member Functions inherited from Entity
static createEntity ($type, FullChunk $chunk, Compound $nbt,...$args)
 
static registerEntity ($className, $force=false)
 
- Static Public Member Functions inherited from Location
static fromObject (Vector3 $pos, Level $level=null, $yaw=0.0, $pitch=0.0)
 
- Static Public Member Functions inherited from Position
static fromObject (Vector3 $pos, Level $level=null)
 
- Static Public Member Functions inherited from Vector3
static getOppositeSide ($side)
 

Data Fields

const SURVIVAL = 0
 
const CREATIVE = 1
 
const ADVENTURE = 2
 
const SPECTATOR = 3
 
const VIEW = Player::SPECTATOR
 
const SURVIVAL_SLOTS = 36
 
const CREATIVE_SLOTS = 112
 
 $spawned = false
 
 $loggedIn = false
 
 $gamemode
 
 $lastBreak
 
 $speed = null
 
 $blocked = false
 
 $achievements = []
 
 $lastCorrect
 
 $craftingType = 0
 
 $loginData = []
 
 $creationTime = 0
 
 $usedChunks = []
 
- Data Fields inherited from Human
const DATA_PLAYER_FLAG_SLEEP = 1
 
const DATA_PLAYER_FLAG_DEAD = 2
 
const DATA_PLAYER_FLAGS = 16
 
const DATA_PLAYER_BED_POSITION = 17
 
 $width = 0.6
 
 $length = 0.6
 
 $height = 1.8
 
 $eyeHeight = 1.62
 
- Data Fields inherited from Entity
const NETWORK_ID = -1
 
const DATA_TYPE_BYTE = 0
 
const DATA_TYPE_SHORT = 1
 
const DATA_TYPE_INT = 2
 
const DATA_TYPE_FLOAT = 3
 
const DATA_TYPE_STRING = 4
 
const DATA_TYPE_SLOT = 5
 
const DATA_TYPE_POS = 6
 
const DATA_TYPE_ROTATION = 7
 
const DATA_TYPE_LONG = 8
 
const DATA_FLAGS = 0
 
const DATA_AIR = 1
 
const DATA_NAMETAG = 2
 
const DATA_SHOW_NAMETAG = 3
 
const DATA_SILENT = 4
 
const DATA_POTION_COLOR = 7
 
const DATA_POTION_AMBIENT = 8
 
const DATA_NO_AI = 15
 
const DATA_FLAG_ONFIRE = 0
 
const DATA_FLAG_SNEAKING = 1
 
const DATA_FLAG_RIDING = 2
 
const DATA_FLAG_SPRINTING = 3
 
const DATA_FLAG_ACTION = 4
 
const DATA_FLAG_INVISIBLE = 5
 
 $passenger = null
 
 $vehicle = null
 
 $chunk
 
 $lastX = null
 
 $lastY = null
 
 $lastZ = null
 
 $motionX
 
 $motionY
 
 $motionZ
 
 $temporalVector
 
 $lastMotionX
 
 $lastMotionY
 
 $lastMotionZ
 
 $lastYaw
 
 $lastPitch
 
 $boundingBox
 
 $onGround
 
 $inBlock = false
 
 $positionChanged
 
 $motionChanged
 
 $deadTicks = 0
 
 $height
 
 $eyeHeight = null
 
 $width
 
 $length
 
 $keepMovement = false
 
 $fallDistance = 0
 
 $ticksLived = 0
 
 $lastUpdate
 
 $maxFireTicks
 
 $fireTicks = 0
 
 $namedtag
 
 $canCollide = true
 
 $isCollided = false
 
 $isCollidedHorizontally = false
 
 $isCollidedVertically = false
 
 $noDamageTicks
 
 $closed = false
 
- Data Fields inherited from Location
 $yaw
 
 $pitch
 
- Data Fields inherited from Position
 $level = null
 
- Data Fields inherited from Vector3
const SIDE_DOWN = 0
 
const SIDE_UP = 1
 
const SIDE_NORTH = 2
 
const SIDE_SOUTH = 3
 
const SIDE_WEST = 4
 
const SIDE_EAST = 5
 
 $x
 
 $y
 
 $z
 

Protected Member Functions

 switchLevel (Level $targetLevel)
 
 sendNextChunk ()
 
 doFirstSpawn ()
 
 orderChunks ()
 
 checkGroundState ($movX, $movY, $movZ, $dx, $dy, $dz)
 
 checkBlockCollision ()
 
 checkNearEntities ($tickDiff)
 
 processMovement ($tickDiff)
 
 updateMovement ()
 
 checkTeleportPosition ()
 
- Protected Member Functions inherited from Human
 initEntity ()
 
- Protected Member Functions inherited from Living
 initEntity ()
 
- Protected Member Functions inherited from Entity
 recalculateEffectColor ()
 
 initEntity ()
 
 checkObstruction ($x, $y, $z)
 
 updateMovement ()
 
 updateFallState ($distanceThisTick, $onGround)
 
 switchLevel (Level $targetLevel)
 
 checkGroundState ($movX, $movY, $movZ, $dx, $dy, $dz)
 
 checkBlockCollision ()
 
 checkChunks ()
 

Protected Attributes

 $interface
 
 $windowCnt = 2
 
 $windows
 
 $windowIndex = []
 
 $messageCounter = 2
 
 $sendIndex = 0
 
 $currentTransaction = null
 
 $isCrafting = false
 
 $randomClientId
 
 $lastMovement = 0
 
 $forceMovement = null
 
 $teleportPosition = null
 
 $connected = true
 
 $ip
 
 $removeFormat = true
 
 $port
 
 $username
 
 $iusername
 
 $displayName
 
 $startAction = -1
 
 $sleeping = null
 
 $clientID = null
 
 $stepHeight = 0.6
 
 $chunkLoadCount = 0
 
 $loadQueue = []
 
 $nextChunkOrderRun = 5
 
 $hiddenPlayers = []
 
 $newPosition
 
 $viewDistance
 
 $chunksPerTick
 
 $spawnThreshold
 
 $inAirTicks = 0
 
 $startAirTicks = 5
 
 $autoJump = true
 
 $allowFlight = false
 
- Protected Attributes inherited from Human
 $inventory
 
 $uuid
 
 $rawUUID
 
 $skinName
 
 $skin
 
- Protected Attributes inherited from Living
 $gravity = 0.08
 
 $drag = 0.02
 
 $attackTime = 0
 
 $invisible = false
 
- Protected Attributes inherited from Entity
 $hasSpawned = []
 
 $effects = []
 
 $id
 
 $dataFlags = 0
 
 $dataProperties
 
 $lastDamageCause = null
 
 $age = 0
 
 $ySize = 0
 
 $stepHeight = 0
 
 $isStatic = false
 
 $justCreated
 
 $fireProof
 
 $gravity
 
 $drag
 
 $server
 
 $timings
 
 $isPlayer = false
 

Additional Inherited Members

- Static Public Attributes inherited from Entity
static $entityCount = 1
 

Detailed Description

Main class that handles networking, recovery, and packet sending to the server part

Constructor & Destructor Documentation

__construct ( SourceInterface  $interface,
  $clientID,
  $ip,
  $port 
)
Parameters
SourceInterface$interface
null$clientID
string$ip
integer$port

Member Function Documentation

addAttachment ( Plugin  $plugin,
  $name = null,
  $value = null 
)
Parameters
Plugin$plugin
string$name
bool$value
Returns
permission

Implements Permissible.

addEntityMotion (   $entityId,
  $x,
  $y,
  $z 
)
addEntityMovement (   $entityId,
  $x,
  $y,
  $z,
  $yaw,
  $pitch,
  $headYaw = null 
)
addWindow ( Inventory  $inventory,
  $forceId = null 
)

Returns the created/existing window id

Parameters
Inventory$inventory
int$forceId
Returns
int
awardAchievement (   $achievementId)
Parameters
string$achievementId
Returns
bool
batchDataPacket ( DataPacket  $packet)

Batch a Data packet into the channel list to send at the end of the tick

Parameters
DataPacket$packet
Returns
bool
canSee ( Player  $player)
Parameters
Player$player
Returns
bool
close (   $message = "",
  $reason = "generic reason",
  $notify = true 
)
final

Note for plugin developers: use kick() with the isAdmin flag set to kick without the "Kicked by admin" part instead of this method.

Parameters
string$messageMessage to be broadcasted
string$reasonReason showed in console
bool$notify
dataPacket ( DataPacket  $packet,
  $needACK = false 
)

Sends an ordered DataPacket to the send buffer

Parameters
DataPacket$packet
bool$needACK
Returns
int|bool
directDataPacket ( DataPacket  $packet,
  $needACK = false 
)
Parameters
DataPacket$packet
bool$needACK
Returns
bool|int
getAddress ( )

Gets the player IP address

Returns
string
static getChunkCacheFromData (   $chunkX,
  $chunkZ,
  $payload,
  $ordering = FullChunkDataPacket::ORDER_COLUMNS 
)
static
Parameters
$chunkX
$chunkZ
$payload
Returns
DataPacket
getClientId ( )

This might disappear in the future. Please use getUniqueId() instead (IP + clientId + name combo, in the future it'll change to real UUID for online auth)

Deprecated:
getDisplayName ( )

Gets the "friendly" name to display of this player to use in the chat.

Returns
string
getEffectivePermissions ( )
Returns
permission[]

Implements Permissible.

getFirstPlayed ( )
Returns
int|double

Implements IPlayer.

getGamemode ( )
Returns
int
getLastPlayed ( )
Returns
int|double

Implements IPlayer.

getLoaderId ( )

Returns the ChunkLoader id. Call Level::generateChunkLoaderId($this) to generate and save it

Returns
int

Implements ChunkLoader.

getMetadata (   $metadataKey)

Returns a list of previously set metadata values from the implementing object's metadata store.

Parameters
string$metadataKey
Returns
MetadataValue[]

Implements Metadatable.

getName ( )

Gets the username

Returns
string

Implements CommandSender.

getPlayer ( )
Returns
Player|null

Implements IPlayer.

getPort ( )
Returns
int
getRemoveFormat ( )
Returns
bool
getServer ( )
Returns
Server

Implements CommandSender.

getSpawn ( )
Returns
Position
getWindowId ( Inventory  $inventory)
Parameters
Inventory$inventory
Returns
int
hasAchievement (   $achievementId)
Parameters
string$achievementId
Returns
bool
hasMetadata (   $metadataKey)

Tests to see whether the implementing object contains the given metadata value in its metadata store.

Parameters
string$metadataKey
Returns
boolean

Implements Metadatable.

hasPermission (   $name)
Parameters
permission\Permission | string$name
Returns
bool

Implements Permissible.

hasPlayedBefore ( )
Returns
mixed

Implements IPlayer.

hidePlayer ( Player  $player)
Parameters
Player$player
isBanned ( )
Returns
bool

Implements IPlayer.

isConnected ( )
Returns
bool
isLoaderActive ( )

Returns if the chunk loader is currently active

Returns
bool

Implements ChunkLoader.

isOnline ( )
Returns
bool

Implements IPlayer.

isOp ( )
Returns
bool

Implements ServerOperator.

isPermissionSet (   $name)
Parameters
permission\Permission | string$name
Returns
bool

Implements Permissible.

isSleeping ( )
Returns
bool
isWhitelisted ( )
Returns
bool

Implements IPlayer.

kick (   $reason = "",
  $isAdmin = true 
)

Kicks a player from the server

Parameters
string$reason
bool$isAdmin
Returns
bool
onBlockChanged ( Vector3  $block)

This method will be called when a block changes in a registered chunk

Parameters
Block | Vector3$block

Implements ChunkLoader.

onChunkChanged ( FullChunk  $chunk)

This method will be called when a Chunk is replaced by a new one

Parameters
FullChunk$chunk

Implements ChunkLoader.

onChunkLoaded ( FullChunk  $chunk)

This method will be called when a registered chunk is loaded

Parameters
FullChunk$chunk

Implements ChunkLoader.

onChunkPopulated ( FullChunk  $chunk)

This method will be called when a registered chunk is populated Usually it'll be sent with another call to onChunkChanged()

Parameters
FullChunk$chunk

Implements ChunkLoader.

onChunkUnloaded ( FullChunk  $chunk)

This method will be called when a registered chunk is unloaded

Parameters
FullChunk$chunk

Implements ChunkLoader.

recalculatePermissions ( )
Returns
void

Implements Permissible.

removeAchievement (   $achievementId)
Parameters
string$achievementId
removeAttachment ( PermissionAttachment  $attachment)
Parameters
PermissionAttachment$attachment

Implements Permissible.

removeMetadata (   $metadataKey,
Plugin  $owningPlugin 
)

Removes the given metadata value from the implementing object's metadata store.

Parameters
string$metadataKey
Plugin$owningPlugin
Returns
void

Implements Metadatable.

save (   $async = false)

Handles player data saving

sendMessage (   $message)

Sends a direct chat message to a player

Parameters
string | TextContainer$message

Implements CommandSender.

sendSettings ( )

Sends all the option flags

setBanned (   $banned)
Parameters
bool$banned

Implements IPlayer.

setDisplayName (   $name)
Parameters
string$name
setGamemode (   $gm)

Sets the gamemode, and if needed, kicks the Player.

Parameters
int$gm
Returns
bool
setMetadata (   $metadataKey,
MetadataValue  $newMetadataValue 
)

Sets a metadata value in the implementing object's metadata store.

Parameters
string$metadataKey
MetadataValue$newMetadataValue
Returns
void

Implements Metadatable.

setOp (   $value)
Parameters
bool$value

Implements ServerOperator.

setRemoveFormat (   $remove = true)
Parameters
bool$remove
setSpawn ( Vector3  $pos)

Sets the spawnpoint of the player (and the compass direction) to a Vector3, or set it on another world with a Position object

Parameters
Vector3 | Position$pos
setWhitelisted (   $value)
Parameters
bool$value

Implements IPlayer.

showPlayer ( Player  $player)
Parameters
Player$player
sleepOn ( Vector3  $pos)
Parameters
Vector3$pos
Returns
boolean
spawnTo ( Player  $player)
Parameters
Player$player
teleport ( Vector3  $pos,
  $yaw = null,
  $pitch = null 
)
Parameters
Vector3 | Position | Location$pos
float$yaw
float$pitch
Returns
bool
teleportImmediate ( Vector3  $pos,
  $yaw = null,
  $pitch = null 
)

This method may not be reliable. Clients don't like to be moved into unloaded chunks. Use teleport() for a delayed teleport after chunks have been sent.

Parameters
Vector3$pos
float$yaw
float$pitch

The documentation for this class was generated from the following file: