PocketMine-MP 5.14.2 git-50e2c469a547a16a23b2dc691e70a51d34e29395
pocketmine\player\Player Class Reference
+ Inheritance diagram for pocketmine\player\Player:
+ Collaboration diagram for pocketmine\player\Player:

Public Member Functions

 __construct (Server $server, NetworkSession $session, PlayerInfo $playerInfo, bool $authenticated, Location $spawnLocation, ?CompoundTag $namedtag)
 
 __debugInfo ()
 
 __toString ()
 
 addAttachment (Plugin $plugin, ?string $name=null, ?bool $value=null)
 
 addMotion (float $x, float $y, float $z)
 
 applyDamageModifiers (EntityDamageEvent $source)
 
 attack (EntityDamageEvent $source)
 
 attackBlock (Vector3 $pos, int $face)
 
 attackEntity (Entity $entity)
 
 breakBlock (Vector3 $pos)
 
 broadcastAnimation (Animation $animation, ?array $targets=null)
 
 broadcastSound (Sound $sound, ?array $targets=null)
 
 canBeCollidedWith ()
 
 canBeMovedByCurrents ()
 
 canBeRenamed ()
 
 canBreathe ()
 
 canClimb ()
 
 canClimbWalls ()
 
 canCollideWith (Entity $entity)
 
 canInteract (Vector3 $pos, float $maxDistance, float $maxDiff=M_SQRT3/2)
 
 canSaveWithChunk ()
 
 canSee (Player $player)
 
 changeSkin (Skin $skin, string $newSkinName, string $oldSkinName)
 
 chat (string $message)
 
 close ()
 
 consumeHeldItem ()
 
 consumeObject (Consumable $consumable)
 
 continueBreakBlock (Vector3 $pos, int $face)
 
 damageArmor (float $damage)
 
 despawnFrom (Player $player, bool $send=true)
 
 despawnFromAll ()
 
 disconnect (Translatable|string $reason, Translatable|string|null $quitMessage=null, Translatable|string|null $disconnectScreenMessage=null)
 
 doChunkRequests ()
 
 doFirstSpawn ()
 
 dropItem (Item $item)
 
 emote (string $emoteId)
 
 extinguish ()
 
 flagForDespawn ()
 
 getAbsorption ()
 
 getAirSupplyTicks ()
 
 getAllowFlight ()
 
 getArmorInventory ()
 
 getArmorPoints ()
 
 getAttributeMap ()
 
 getBoundingBox ()
 
 getCraftingGrid ()
 
 getCreativeInventory ()
 
 getCurrentWindow ()
 
 getCursorInventory ()
 
 getDirectionPlane ()
 
 getDirectionVector ()
 
 getDisplayName ()
 
 getDrops ()
 
 getEffectivePermissions ()
 
 getEffects ()
 
 getEnchantmentSeed ()
 
 getEnderInventory ()
 
 getEyeHeight ()
 
 getEyePos ()
 
 getFallDistance ()
 
 getFireTicks ()
 
 getFirstPlayed ()
 
 getGamemode ()
 
 getGravity ()
 
 getHealth ()
 
 getHighestArmorEnchantmentLevel (Enchantment $enchantment)
 
 getHorizontalFacing ()
 
 getHungerManager ()
 
 getId ()
 
 getInAirTicks ()
 
 getInventory ()
 
 getItemCooldownExpiry (Item $item)
 
 getItemUseDuration ()
 
 getJumpVelocity ()
 
 getLanguage ()
 
 getLastDamageCause ()
 
 getLastPlayed ()
 
 getLeaveMessage ()
 
 getLineOfSight (int $maxDistance, int $maxLength=0, array $transparent=[])
 
 getLocale ()
 
 getLocation ()
 
 getMaxAirSupplyTicks ()
 
 getMaxHealth ()
 
 getMotion ()
 
 getMovementSpeed ()
 
 getName ()
 
 getNameTag ()
 
 getNetworkProperties ()
 
 getNetworkSession ()
 
 getOffHandInventory ()
 
 getOffsetPosition (Vector3 $vector3)
 
 getOwningEntity ()
 
 getOwningEntityId ()
 
 getPermissionRecalculationCallbacks ()
 
 getPlayerInfo ()
 
 getPosition ()
 
 getSaveData ()
 
 getScale ()
 
 getScoreTag ()
 
 getScreenLineHeight ()
 
 getServer ()
 
 getSize ()
 
 getSkin ()
 
 getSpawn ()
 
 getTargetBlock (int $maxDistance, array $transparent=[])
 
 getTargetEntity ()
 
 getTargetEntityId ()
 
 getUniqueId ()
 
 getUsedChunks ()
 
 getUsedChunkStatus (int $chunkX, int $chunkZ)
 
 getViewDistance ()
 
 getViewers ()
 
 getWorld ()
 
 getXpDropAmount ()
 
 getXpManager ()
 
 getXuid ()
 
 handleMovement (Vector3 $newPos)
 
 hasAutoJump ()
 
 hasBlockCollision ()
 
 hasFiniteResources ()
 
 hasGravity ()
 
 hasItemCooldown (Item $item)
 
 hasMovementUpdate ()
 
 hasNoClientPredictions ()
 
 hasPermission (Permission|string $name)
 
 hasPlayedBefore ()
 
 hasReceivedChunk (int $chunkX, int $chunkZ)
 
 hasValidCustomSpawn ()
 
 heal (EntityRegainHealthEvent $source)
 
 hidePlayer (Player $player)
 
 interactBlock (Vector3 $pos, int $face, Vector3 $clickOffset)
 
 interactEntity (Entity $entity, Vector3 $clickPos)
 
 isAdventure (bool $literal=false)
 
 isAlive ()
 
 isAuthenticated ()
 
 isBreathing ()
 
 isClosed ()
 
 isConnected ()
 
 isCreative (bool $literal=false)
 
 isFireProof ()
 
 isFlaggedForDespawn ()
 
 isFlying ()
 
 isGliding ()
 
 isInsideOfSolid ()
 
 isInvisible ()
 
 isNameTagAlwaysVisible ()
 
 isNameTagVisible ()
 
 isOnFire ()
 
 isOnGround ()
 
 isOnline ()
 
 isPermissionSet (Permission|string $name)
 
 isSilent ()
 
 isSleeping ()
 
 isSneaking ()
 
 isSpectator ()
 
 isSprinting ()
 
 isSurvival (bool $literal=false)
 
 isSwimming ()
 
 isUnderwater ()
 
 isUsingChunk (int $chunkX, int $chunkZ)
 
 isUsingItem ()
 
 jump ()
 
 kick (Translatable|string $reason="", Translatable|string|null $quitMessage=null, Translatable|string|null $disconnectScreenMessage=null)
 
 kill ()
 
 knockBack (float $x, float $z, float $force=self::DEFAULT_KNOCKBACK_FORCE, ?float $verticalLimit=self::DEFAULT_KNOCKBACK_VERTICAL_LIMIT)
 
 lookAt (Vector3 $target)
 
 missSwing ()
 
 onAirExpired ()
 
 onBlockChanged (Vector3 $block)
 
onChunkUnloaded as onChunkChanged (int $chunkX, int $chunkZ, Chunk $chunk)
 
 onChunkLoaded (int $chunkX, int $chunkZ, Chunk $chunk)
 
 onChunkPopulated (int $chunkX, int $chunkZ, Chunk $chunk)
 
 onChunkUnloaded (int $chunkX, int $chunkZ, Chunk $chunk)
 
 onCollideWithPlayer (Player $player)
 
 onFormSubmit (int $formId, mixed $responseData)
 
 onInteract (Player $player, Vector3 $clickPos)
 
 onNearbyBlockChange ()
 
 onPostDisconnect (Translatable|string $reason, Translatable|string|null $quitMessage)
 
 onRandomUpdate ()
 
 onUpdate (int $currentTick)
 
 openSignEditor (Vector3 $position)
 
 pickBlock (Vector3 $pos, bool $addTileNBT)
 
 recalculatePermissions ()
 
 regenerateEnchantmentSeed ()
 
 releaseHeldItem ()
 
 removeAttachment (PermissionAttachment $attachment)
 
 removeCurrentWindow ()
 
 removeTitles ()
 
 resetFallDistance ()
 
 resetItemCooldown (Item $item, ?int $ticks=null)
 
 resetTitles ()
 
 respawn ()
 
 respawnToAll ()
 
 save ()
 
 saveNBT ()
 
 scheduleUpdate ()
 
 selectHotbarSlot (int $hotbarSlot)
 
 sendActionBarMessage (string $message)
 
 sendData (?array $targets, ?array $data=null)
 
 sendForm (Form $form)
 
 sendJukeboxPopup (Translatable|string $message)
 
 sendMessage (Translatable|string $message)
 
 sendPopup (string $message)
 
 sendSkin (?array $targets=null)
 
 sendSubTitle (string $subtitle)
 
 sendTip (string $message)
 
 sendTitle (string $title, string $subtitle="", int $fadeIn=-1, int $stay=-1, int $fadeOut=-1)
 
 sendToastNotification (string $title, string $body)
 
 setAbsorption (float $absorption)
 
 setAirSupplyTicks (int $ticks)
 
 setAllowFlight (bool $value)
 
 setAutoJump (bool $value)
 
 setBasePermission (Permission|string $name, bool $grant)
 
 setBreathing (bool $value=true)
 
 setCanClimb (bool $value=true)
 
 setCanClimbWalls (bool $value=true)
 
 setCanSaveWithChunk (bool $value)
 
 setCreativeInventory (CreativeInventory $inventory)
 
 setCurrentWindow (Inventory $inventory)
 
 setDisplayName (string $name)
 
 setEnchantmentSeed (int $seed)
 
 setFallDistance (float $fallDistance)
 
 setFireTicks (int $fireTicks)
 
 setFlying (bool $value)
 
 setForceMovementUpdate (bool $value=true)
 
 setGamemode (GameMode $gm)
 
 setGliding (bool $value=true)
 
 setGravity (float $gravity)
 
 setHasBlockCollision (bool $value)
 
 setHasGravity (bool $v=true)
 
 setHealth (float $amount)
 
 setInvisible (bool $value=true)
 
 setLastDamageCause (EntityDamageEvent $type)
 
 setMaxAirSupplyTicks (int $ticks)
 
 setMaxHealth (int $amount)
 
 setMotion (Vector3 $motion)
 
 setMovementSpeed (float $v, bool $fit=false)
 
 setNameTag (string $name)
 
 setNameTagAlwaysVisible (bool $value=true)
 
 setNameTagVisible (bool $value=true)
 
 setNoClientPredictions (bool $value=true)
 
 setOnFire (int $seconds)
 
 setOwningEntity (?Entity $owner)
 
 setRotation (float $yaw, float $pitch)
 
 setScale (float $value)
 
 setScoreTag (string $score)
 
 setScreenLineHeight (?int $height)
 
 setSilent (bool $value=true)
 
 setSkin (Skin $skin)
 
 setSneaking (bool $value=true)
 
 setSpawn (?Vector3 $pos)
 
 setSprinting (bool $value=true)
 
 setSwimming (bool $value=true)
 
 setTargetEntity (?Entity $target)
 
 setTitleDuration (int $fadeIn, int $stay, int $fadeOut)
 
 setUsingItem (bool $value)
 
 setViewDistance (int $distance)
 
 showPlayer (Player $player)
 
 sleepOn (Vector3 $pos)
 
 spawnTo (Player $player)
 
 spawnToAll ()
 
 stopBreakBlock (Vector3 $pos)
 
 stopSleep ()
 
 teleport (Vector3 $pos, ?float $yaw=null, ?float $pitch=null)
 
 toggleFlight (bool $fly)
 
 toggleGlide (bool $glide)
 
 toggleSneak (bool $sneak)
 
 toggleSprint (bool $sprint)
 
 toggleSwim (bool $swim)
 
 transfer (string $address, int $port=19132, Translatable|string|null $message=null)
 
 unsetBasePermission (Permission|string $name)
 
 useHeldItem ()
 

Static Public Member Functions

static getNetworkTypeId ()
 
static isValidUserName (?string $name)
 
static nextRuntimeId ()
 
static parseSkinNBT (CompoundTag $nbt)
 

Public Attributes

AxisAlignedBB $boundingBox
 
int $deadTicks = 0
 
float $fallDistance = 0.0
 
bool $isCollided = false
 
bool $isCollidedHorizontally = false
 
bool $isCollidedVertically = false
 
bool $keepMovement = false
 
int $lastUpdate
 
int $noDamageTicks = 0
 
bool $onGround = false
 
EntitySizeInfo $size
 
bool $spawned = false
 
int $ticksLived = 0
 
const DEFAULT_KNOCKBACK_FORCE = 0.4
 
const DEFAULT_KNOCKBACK_VERTICAL_LIMIT = 0.4
 
const MOTION_THRESHOLD = 0.00001
 
const TAG_FIRST_PLAYED = "firstPlayed"
 
const TAG_LAST_KNOWN_XUID = "LastKnownXUID"
 
const TAG_LAST_PLAYED = "lastPlayed"
 
const TAG_LEVEL = "Level"
 
const TAG_MOTION = "Motion"
 
const TAG_POS = "Pos"
 
const TAG_ROTATION = "Rotation"
 

Protected Member Functions

 actuallyRespawn ()
 
 addAttributes ()
 
 addDefaultWindows ()
 
 addPermanentInventories (Inventory ... $inventories)
 
 applyConsumptionResults (Consumable $consumable)
 
 applyDragBeforeGravity ()
 
 applyPostDamageEffects (EntityDamageEvent $source)
 
 broadcastMotion ()
 
 broadcastMovement (bool $teleport=false)
 
 calculateFallDamage (float $fallDistance)
 
 checkBlockIntersections ()
 
 checkGroundState (float $wantedX, float $wantedY, float $wantedZ, float $dx, float $dy, float $dz)
 
 checkItemCooldowns ()
 
 checkNearEntities ()
 
 checkObstruction (float $x, float $y, float $z)
 
 dealFireDamage ()
 
 destroyCycles ()
 
 doAirSupplyTick (int $tickDiff)
 
 doHitAnimation ()
 
 doOnFireTick (int $tickDiff=1)
 
 endDeathAnimation ()
 
 entityBaseTick (int $tickDiff=1)
 
 getAllNetworkData ()
 
 getBlocksAroundWithEntityInsideActions ()
 
 getBlocksIntersected (float $inset)
 
 getDirtyNetworkData ()
 
 getInitialDragMultiplier ()
 
 getInitialGravity ()
 
 getInitialSizeInfo ()
 
 initEntity (CompoundTag $nbt)
 
 initHumanData (CompoundTag $nbt)
 
 internalSetGameMode (GameMode $gameMode)
 
 move (float $dx, float $dy, float $dz)
 
 onDeath ()
 
 onDeathUpdate (int $tickDiff)
 
 onDispose ()
 
 onFirstUpdate (int $currentTick)
 
 onHitGround ()
 
 orderChunks ()
 
 processMostRecentMovements ()
 
 recalculateBoundingBox ()
 
 removePermanentInventories ()
 
 requestChunks ()
 
 resetLastMovements ()
 
 revertMovement (Location $from)
 
 sendPosition (Vector3 $pos, ?float $yaw=null, ?float $pitch=null, int $mode=MovePlayerPacket::MODE_NORMAL)
 
 sendSpawnPacket (Player $player)
 
 setPosition (Vector3 $pos)
 
 setPositionAndRotation (Vector3 $pos, float $yaw, float $pitch)
 
 setSize (EntitySizeInfo $size)
 
 spawnEntitiesOnAllChunks ()
 
 spawnEntitiesOnChunk (int $chunkX, int $chunkZ)
 
 startDeathAnimation ()
 
 syncNetworkData (EntityMetadataCollection $properties)
 
 tryChangeMovement ()
 
 unloadChunk (int $x, int $z, ?World $world=null)
 
 updateFallState (float $distanceThisTick, bool $onGround)
 
 updateMovement (bool $teleport=false)
 

Protected Attributes

Attribute $absorptionAttr
 
bool $allowFlight = false
 
bool $alwaysShowNameTag = false
 
ArmorInventory $armorInventory
 
int $attackTime = 0
 
AttributeMap $attributeMap
 
bool $authenticated
 
bool $autoJump = true
 
SurvivalBlockBreakHandler $blockBreakHandler = null
 
bool $blockCollision = true
 
array $blocksAround = null
 
bool $breathing = true
 
int $breathTicks = self::DEFAULT_BREATH_TICKS
 
bool $canClimb = false
 
bool $canClimbWalls = false
 
ChunkLoader $chunkLoader
 
ChunkSelector $chunkSelector
 
int $chunksPerTick
 
ChunkTicker $chunkTicker
 
bool $closed = false
 
PlayerCraftingInventory $craftingGrid
 
CreativeInventory $creativeInventory
 
Inventory $currentWindow = null
 
PlayerCursorInventory $cursorInventory
 
string $displayName
 
float $drag
 
EffectManager $effectManager
 
PlayerEnderInventory $enderInventory
 
int $fireTicks = 0
 
int $firstPlayed
 
bool $flying = false
 
bool $forceMovementUpdate = false
 
int $formIdCounter = 0
 
array $forms = []
 
GameMode $gamemode
 
bool $gliding = false
 
float $gravity
 
bool $gravityEnabled = true
 
array $hasSpawned = []
 
Attribute $healthAttr
 
array $hiddenPlayers = []
 
HungerManager $hungerManager
 
int $id
 
int $inAirTicks = 0
 
PlayerInventory $inventory
 
bool $invisible = false
 
float $jumpVelocity = 0.42
 
bool $justCreated = true
 
Attribute $knockbackResistanceAttr
 
EntityDamageEvent $lastDamageCause = null
 
Location $lastLocation
 
Vector3 $lastMotion
 
float $lastMovementProcess = null
 
int $lastPlayed
 
int $lineHeight = null
 
array $loadQueue = []
 
string $locale = "en_US"
 
Location $location
 
Logger $logger
 
int $maxBreathTicks = self::DEFAULT_BREATH_TICKS
 
int $maxDeadTicks = 25
 
int $messageCounter = 2
 
Vector3 $motion
 
float $moveRateLimit = 10 * self::MOVES_PER_TICK
 
Attribute $moveSpeedAttr
 
string $nameTag = ""
 
bool $nameTagVisible = true
 
bool $networkPropertiesDirty = false
 
NetworkSession $networkSession
 
int $nextChunkOrderRun = 5
 
bool $noClientPredictions = false
 
PlayerOffHandInventory $offHandInventory
 
int $ownerId = null
 
array $permanentWindows = []
 
PlayerInfo $playerInfo
 
float $scale = 1.0
 
string $scoreTag = ""
 
Server $server
 
bool $silent = false
 
Skin $skin
 
Vector3 $sleeping = null
 
bool $sneaking = false
 
int $spawnChunkLoadCount = 0
 
int $spawnThreshold
 
bool $sprinting = false
 
int $startAction = -1
 
float $stepHeight = 0.6
 
bool $swimming = false
 
int $targetId = null
 
TimingsHandler $timings
 
array $usedChunks = []
 
array $usedItemsCooldown = []
 
string $username
 
UuidInterface $uuid
 
int $viewDistance = -1
 
ExperienceManager $xpManager
 
int $xpSeed
 
string $xuid = ""
 
float $ySize = 0.0
 
const DEFAULT_BREATH_TICKS = 300
 
const STEP_CLIP_MULTIPLIER = 0.4
 

Detailed Description

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

Definition at line 168 of file Player.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\player\Player::__construct ( Server  $server,
NetworkSession  $session,
PlayerInfo  $playerInfo,
bool  $authenticated,
Location  $spawnLocation,
?CompoundTag  $namedtag 
)

Definition at line 299 of file Player.php.

◆ __destruct()

pocketmine\player\Player::__destruct ( )

Reimplemented from pocketmine\entity\Entity.

Definition at line 2304 of file Player.php.

Member Function Documentation

◆ __debugInfo()

pocketmine\player\Player::__debugInfo ( )
Returns
mixed[]

Definition at line 2300 of file Player.php.

◆ __toString()

pocketmine\entity\Entity::__toString ( )
inherited

Definition at line 1705 of file Entity.php.

◆ actuallyRespawn()

pocketmine\player\Player::actuallyRespawn ( )
protected

Definition at line 2398 of file Player.php.

◆ addAttachment()

pocketmine\permission\Permissible::addAttachment ( Plugin  $plugin,
?string  $name = null,
?bool  $value = null 
)
inherited

◆ addAttributes()

pocketmine\entity\Living::addAttributes ( )
protectedinherited

Reimplemented from pocketmine\entity\Entity.

Definition at line 187 of file Living.php.

◆ addDefaultWindows()

pocketmine\player\Player::addDefaultWindows ( )
protected

Definition at line 2544 of file Player.php.

◆ addMotion()

pocketmine\entity\Entity::addMotion ( float  $x,
float  $y,
float  $z 
)
inherited

Adds the given values to the entity's motion vector.

Definition at line 1423 of file Entity.php.

Referenced by pocketmine\entity\effect\LevitationEffect\applyEffect().

+ Here is the caller graph for this function:

◆ addPermanentInventories()

pocketmine\player\Player::addPermanentInventories ( Inventory ...  $inventories)
protected

Definition at line 2666 of file Player.php.

◆ applyConsumptionResults()

pocketmine\entity\Human::applyConsumptionResults ( Consumable  $consumable)
protectedinherited

Applies effects from consuming the object. This shouldn't do any can-consume checks (those are expected to be handled by the caller).

Reimplemented from pocketmine\entity\Living.

Definition at line 200 of file Human.php.

◆ applyDamageModifiers()

pocketmine\entity\Human::applyDamageModifiers ( EntityDamageEvent  $source)
inherited

Called prior to EntityDamageEvent execution to apply modifications to the event's damage, such as reduction due to effects or armour.

Reimplemented from pocketmine\entity\Living.

Definition at line 365 of file Human.php.

◆ applyDragBeforeGravity()

pocketmine\entity\Entity::applyDragBeforeGravity ( )
protectedinherited

Definition at line 823 of file Entity.php.

◆ applyPostDamageEffects()

pocketmine\player\Player::applyPostDamageEffects ( EntityDamageEvent  $source)
protected

Called after EntityDamageEvent execution to apply post-hurt effects, such as reducing absorption or modifying armour durability. This will not be called by damage sources causing death.

Reimplemented from pocketmine\entity\Human.

Definition at line 2451 of file Player.php.

◆ attack()

pocketmine\player\Player::attack ( EntityDamageEvent  $source)

Reimplemented from pocketmine\entity\Living.

Definition at line 2457 of file Player.php.

◆ attackBlock()

pocketmine\player\Player::attackBlock ( Vector3  $pos,
int  $face 
)

Performs a left-click (attack) action on the block.

Returns
bool if an action took place successfully

Definition at line 1735 of file Player.php.

◆ attackEntity()

pocketmine\player\Player::attackEntity ( Entity  $entity)

Attacks the given entity with the currently-held item. TODO: move this up the class hierarchy

Returns
bool if the entity was dealt damage

Definition at line 1837 of file Player.php.

◆ breakBlock()

pocketmine\player\Player::breakBlock ( Vector3  $pos)

Breaks the block at the given position using the currently-held item.

Returns
bool if the block was successfully broken, false if a rollback needs to take place.

Definition at line 1786 of file Player.php.

◆ broadcastAnimation()

pocketmine\player\Player::broadcastAnimation ( Animation  $animation,
?array  $targets = null 
)
Parameters
Player[] | null$targets

Reimplemented from pocketmine\entity\Entity.

Definition at line 2491 of file Player.php.

◆ broadcastMotion()

pocketmine\entity\Entity::broadcastMotion ( )
protectedinherited

Definition at line 802 of file Entity.php.

◆ broadcastMovement()

pocketmine\entity\Entity::broadcastMovement ( bool  $teleport = false)
protectedinherited

Definition at line 784 of file Entity.php.

◆ broadcastSound()

pocketmine\player\Player::broadcastSound ( Sound  $sound,
?array  $targets = null 
)

Broadcasts a sound caused by the entity. If the entity is considered "silent", the sound will be dropped.

Parameters
Player[] | null$targets

Reimplemented from pocketmine\entity\Entity.

Definition at line 2499 of file Player.php.

Referenced by pocketmine\item\Armor\onClickAir().

+ Here is the caller graph for this function:

◆ calculateFallDamage()

pocketmine\player\Player::calculateFallDamage ( float  $fallDistance)
protected

Reimplemented from pocketmine\entity\Living.

Definition at line 1384 of file Player.php.

◆ canBeCollidedWith()

pocketmine\player\Player::canBeCollidedWith ( )

Reimplemented from pocketmine\entity\Entity.

Definition at line 565 of file Player.php.

◆ canBeMovedByCurrents()

pocketmine\player\Player::canBeMovedByCurrents ( )

Returns whether this entity can be moved by currents in liquids.

Reimplemented from pocketmine\entity\Entity.

Definition at line 1241 of file Player.php.

◆ canBeRenamed()

pocketmine\player\Player::canBeRenamed ( )

Returns whether players can rename this entity using a name tag. Note that plugins can still name entities using setNameTag().

Reimplemented from pocketmine\entity\Living.

Definition at line 633 of file Player.php.

◆ canBreathe()

pocketmine\player\Player::canBreathe ( )

Returns whether the entity can currently breathe.

Reimplemented from pocketmine\entity\Living.

Definition at line 1468 of file Player.php.

◆ canClimb()

pocketmine\entity\Entity::canClimb ( )
inherited

Returns whether the entity is able to climb blocks such as ladders or vines.

Definition at line 368 of file Entity.php.

◆ canClimbWalls()

pocketmine\entity\Entity::canClimbWalls ( )
inherited

Returns whether this entity is climbing a block. By default this is only true if the entity is climbing a ladder or vine or similar block.

Definition at line 383 of file Entity.php.

◆ canCollideWith()

pocketmine\player\Player::canCollideWith ( Entity  $entity)

Reimplemented from pocketmine\entity\Entity.

Definition at line 561 of file Player.php.

◆ canInteract()

pocketmine\player\Player::canInteract ( Vector3  $pos,
float  $maxDistance,
float  $maxDiff = M_SQRT3 / 2 
)

Returns whether the player can interact with the specified position. This checks distance and direction.

Parameters
float$maxDiffdefaults to half of the 3D diagonal width of a block

Definition at line 1477 of file Player.php.

◆ canSaveWithChunk()

pocketmine\player\Player::canSaveWithChunk ( )

Returns whether this entity will be saved when its chunk is unloaded.

Reimplemented from pocketmine\entity\Entity.

Definition at line 2309 of file Player.php.

◆ canSee()

pocketmine\player\Player::canSee ( Player  $player)

Definition at line 539 of file Player.php.

◆ changeSkin()

pocketmine\player\Player::changeSkin ( Skin  $skin,
string  $newSkinName,
string  $oldSkinName 
)

Called when a player changes their skin. Plugin developers should not use this, use setSkin() and sendSkin() instead.

Definition at line 652 of file Player.php.

◆ chat()

pocketmine\player\Player::chat ( string  $message)

Sends a chat message as this player. If the message begins with a / (forward-slash) it will be treated as a command.

Definition at line 1493 of file Player.php.

◆ checkBlockIntersections()

pocketmine\entity\Entity::checkBlockIntersections ( )
protectedinherited

Definition at line 1308 of file Entity.php.

◆ checkGroundState()

pocketmine\player\Player::checkGroundState ( float  $wantedX,
float  $wantedY,
float  $wantedZ,
float  $dx,
float  $dy,
float  $dz 
)
protected

Reimplemented from pocketmine\entity\Entity.

Definition at line 1225 of file Player.php.

◆ checkItemCooldowns()

pocketmine\player\Player::checkItemCooldowns ( )
protected

Definition at line 721 of file Player.php.

◆ checkNearEntities()

pocketmine\player\Player::checkNearEntities ( )
protected

Definition at line 1245 of file Player.php.

◆ checkObstruction()

pocketmine\entity\Entity::checkObstruction ( float  $x,
float  $y,
float  $z 
)
protectedinherited

Definition at line 851 of file Entity.php.

◆ close()

pocketmine\entity\Entity::close ( )
finalinherited

Closes the entity and frees attached references.

WARNING: Entities are unusable after this has been executed!

Definition at line 1587 of file Entity.php.

◆ consumeHeldItem()

pocketmine\player\Player::consumeHeldItem ( )

Consumes the currently-held item.

Returns
bool if the consumption succeeded.

Definition at line 1636 of file Player.php.

◆ consumeObject()

pocketmine\entity\Human::consumeObject ( Consumable  $consumable)
inherited

Causes the mob to consume the given Consumable object, applying applicable effects, health bonuses, food bonuses, etc.

Reimplemented from pocketmine\entity\Living.

Definition at line 192 of file Human.php.

◆ continueBreakBlock()

pocketmine\player\Player::continueBreakBlock ( Vector3  $pos,
int  $face 
)

Definition at line 1769 of file Player.php.

◆ damageArmor()

pocketmine\entity\Living::damageArmor ( float  $damage)
inherited

Damages the worn armour according to the amount of damage given. Each 4 points (rounded down) deals 1 damage point to each armour piece, but never less than 1 total.

Definition at line 502 of file Living.php.

◆ dealFireDamage()

pocketmine\entity\Entity::dealFireDamage ( )
protectedinherited

Called to deal damage to entities when they are on fire.

Definition at line 741 of file Entity.php.

◆ despawnFrom()

pocketmine\entity\Entity::despawnFrom ( Player  $player,
bool  $send = true 
)
inherited
Deprecated:
WARNING: This function DOES NOT permanently hide the entity from the player. As soon as the entity or player moves, the player will once again be able to see the entity.

Definition at line 1541 of file Entity.php.

◆ despawnFromAll()

pocketmine\entity\Entity::despawnFromAll ( )
inherited
Deprecated:
WARNING: This function DOES NOT permanently hide the entity from viewers. As soon as the entity or player moves, viewers will once again be able to see the entity.

Definition at line 1555 of file Entity.php.

◆ destroyCycles()

pocketmine\player\Player::destroyCycles ( )
protected

Called when the entity is disposed, after all events have been fired. This should be used to perform destructive circular object references and things which could impact memory usage.

It is expected that the object is unusable after this is called.

Reimplemented from pocketmine\entity\Human.

Definition at line 2288 of file Player.php.

◆ disconnect()

pocketmine\player\Player::disconnect ( Translatable|string  $reason,
Translatable|string|null  $quitMessage = null,
Translatable|string|null  $disconnectScreenMessage = null 
)

Removes the player from the server. This cannot be cancelled. This is used for remote disconnects and for uninterruptible disconnects (for example, when the server shuts down).

Note for plugin developers: Prefer kick() instead of this method. That way other plugins can have a say in whether the player is removed or not.

Note for internals developers: Do not call this from network sessions. It will cause a feedback loop.

Parameters
Translatable | string$reasonShown in the server log - this should be a short one-line message
Translatable | string | null$quitMessageMessage to broadcast to online players (null will use default)
Translatable | string | null$disconnectScreenMessageShown on the player's disconnection screen (null will use the reason)

Definition at line 2214 of file Player.php.

◆ doAirSupplyTick()

pocketmine\entity\Living::doAirSupplyTick ( int  $tickDiff)
protectedinherited

Ticks the entity's air supply, consuming it when underwater and regenerating it when out of water.

Definition at line 684 of file Living.php.

◆ doChunkRequests()

pocketmine\player\Player::doChunkRequests ( )

Ticks the chunk-requesting mechanism.

Definition at line 1018 of file Player.php.

◆ doFirstSpawn()

pocketmine\player\Player::doFirstSpawn ( )

Called by the network system when the pre-spawn sequence is completed (e.g. after sending spawn chunks). This fires join events and broadcasts join messages to other online players.

Definition at line 880 of file Player.php.

◆ doHitAnimation()

pocketmine\entity\Living::doHitAnimation ( )
protectedinherited

Definition at line 581 of file Living.php.

◆ doOnFireTick()

pocketmine\entity\Entity::doOnFireTick ( int  $tickDiff = 1)
protectedinherited

Definition at line 717 of file Entity.php.

◆ dropItem()

pocketmine\player\Player::dropItem ( Item  $item)

Drops an item on the ground in front of the player.

Definition at line 2032 of file Player.php.

◆ emote()

pocketmine\player\Player::emote ( string  $emoteId)

Reimplemented from pocketmine\entity\Human.

Definition at line 2016 of file Player.php.

◆ endDeathAnimation()

pocketmine\entity\Living::endDeathAnimation ( )
protectedinherited

Definition at line 637 of file Living.php.

◆ entityBaseTick()

pocketmine\entity\Human::entityBaseTick ( int  $tickDiff = 1)
protectedinherited

Reimplemented from pocketmine\entity\Living.

Definition at line 352 of file Human.php.

◆ extinguish()

pocketmine\entity\Entity::extinguish ( )
inherited

Definition at line 708 of file Entity.php.

◆ flagForDespawn()

pocketmine\entity\Entity::flagForDespawn ( )
inherited

Flags the entity to be removed from the world on the next tick.

Definition at line 1566 of file Entity.php.

◆ getAbsorption()

pocketmine\entity\Living::getAbsorption ( )
inherited

Definition at line 220 of file Living.php.

◆ getAirSupplyTicks()

pocketmine\entity\Living::getAirSupplyTicks ( )
inherited

Returns the number of ticks remaining in the entity's air supply. Note that the entity may survive longer than this amount of time without damage due to enchantments such as Respiration.

Definition at line 743 of file Living.php.

◆ getAllNetworkData()

pocketmine\entity\Entity::getAllNetworkData ( )
finalprotectedinherited
Returns
MetadataProperty[] @phpstan-return array<int, MetadataProperty>

Definition at line 1653 of file Entity.php.

◆ getAllowFlight()

pocketmine\player\Player::getAllowFlight ( )

Returns whether the player is allowed to toggle its flight state.

If false, the player is locked in its current flight mode (flying/not flying), and attempts by the player to enter or exit flight mode will be prevented.

Definition at line 468 of file Player.php.

◆ getArmorInventory()

pocketmine\entity\Living::getArmorInventory ( )
inherited

Definition at line 413 of file Living.php.

◆ getArmorPoints()

pocketmine\entity\Living::getArmorPoints ( )
inherited

Returns how many armour points this mob has. Armour points provide a percentage reduction to damage. For mobs which can wear armour, this should return the sum total of the armour points provided by their equipment.

Definition at line 392 of file Living.php.

◆ getAttributeMap()

pocketmine\entity\Entity::getAttributeMap ( )
inherited

Definition at line 626 of file Entity.php.

◆ getBlocksAroundWithEntityInsideActions()

pocketmine\entity\Entity::getBlocksAroundWithEntityInsideActions ( )
protectedinherited
Returns
Block[]

Definition at line 1286 of file Entity.php.

◆ getBlocksIntersected()

pocketmine\entity\Entity::getBlocksIntersected ( float  $inset)
protectedinherited

Yields all the blocks whose full-cube areas are intersected by the entity's AABB.

@phpstan-return \Generator<int, Block, void, void>

Definition at line 1264 of file Entity.php.

◆ getBoundingBox()

pocketmine\entity\Entity::getBoundingBox ( )
inherited

Definition at line 299 of file Entity.php.

◆ getCraftingGrid()

pocketmine\player\Player::getCraftingGrid ( )

Definition at line 2557 of file Player.php.

◆ getCreativeInventory()

pocketmine\player\Player::getCreativeInventory ( )

Returns the creative inventory shown to the player. Unless changed by a plugin, this is usually the same for all players.

Definition at line 2565 of file Player.php.

◆ getCurrentWindow()

pocketmine\player\Player::getCurrentWindow ( )

Returns the inventory the player is currently viewing. This might be a chest, furnace, or any other container.

Definition at line 2623 of file Player.php.

◆ getCursorInventory()

pocketmine\player\Player::getCursorInventory ( )

Definition at line 2553 of file Player.php.

◆ getDirectionPlane()

pocketmine\entity\Entity::getDirectionPlane ( )
inherited

Definition at line 953 of file Entity.php.

◆ getDirectionVector()

pocketmine\entity\Entity::getDirectionVector ( )
inherited

Definition at line 944 of file Entity.php.

◆ getDirtyNetworkData()

pocketmine\entity\Entity::getDirtyNetworkData ( )
finalprotectedinherited
Returns
MetadataProperty[] @phpstan-return array<int, MetadataProperty>

Definition at line 1641 of file Entity.php.

◆ getDisplayName()

pocketmine\player\Player::getDisplayName ( )

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

Reimplemented from pocketmine\entity\Living.

Definition at line 622 of file Player.php.

◆ getDrops()

pocketmine\player\Player::getDrops ( )
Returns
Item[]

Reimplemented from pocketmine\entity\Human.

Definition at line 1209 of file Player.php.

◆ getEffectivePermissions()

pocketmine\permission\Permissible::getEffectivePermissions ( )
inherited
Returns
PermissionAttachmentInfo[]

Implemented in pocketmine\permission\PermissibleInternal.

◆ getEffects()

pocketmine\entity\Living::getEffects ( )
inherited

Definition at line 315 of file Living.php.

◆ getEnchantmentSeed()

pocketmine\entity\Human::getEnchantmentSeed ( )
inherited

Definition at line 213 of file Human.php.

◆ getEnderInventory()

pocketmine\entity\Human::getEnderInventory ( )
inherited

Definition at line 237 of file Human.php.

◆ getEyeHeight()

pocketmine\entity\Entity::getEyeHeight ( )
inherited

Definition at line 1100 of file Entity.php.

◆ getEyePos()

pocketmine\entity\Entity::getEyePos ( )
inherited

Definition at line 1104 of file Entity.php.

◆ getFallDistance()

pocketmine\entity\Entity::getFallDistance ( )
inherited

Definition at line 1065 of file Entity.php.

◆ getFireTicks()

pocketmine\entity\Entity::getFireTicks ( )
inherited

Definition at line 691 of file Entity.php.

◆ getFirstPlayed()

pocketmine\player\Player::getFirstPlayed ( )

TODO: not sure this should be nullable

Implements pocketmine\player\IPlayer.

Definition at line 431 of file Player.php.

◆ getGamemode()

pocketmine\player\Player::getGamemode ( )

Definition at line 1113 of file Player.php.

◆ getGravity()

pocketmine\entity\Entity::getGravity ( )
inherited

Definition at line 806 of file Entity.php.

◆ getHealth()

pocketmine\entity\Entity::getHealth ( )
inherited

Definition at line 583 of file Entity.php.

◆ getHighestArmorEnchantmentLevel()

pocketmine\entity\Living::getHighestArmorEnchantmentLevel ( Enchantment  $enchantment)
inherited

Returns the highest level of the specified enchantment on any armour piece that the entity is currently wearing.

Definition at line 404 of file Living.php.

◆ getHorizontalFacing()

pocketmine\entity\Entity::getHorizontalFacing ( )
inherited

Definition at line 925 of file Entity.php.

◆ getHungerManager()

pocketmine\entity\Human::getHungerManager ( )
inherited

Definition at line 188 of file Human.php.

◆ getId()

pocketmine\entity\Entity::getId ( )
inherited

Definition at line 1473 of file Entity.php.

◆ getInAirTicks()

pocketmine\player\Player::getInAirTicks ( )

Definition at line 1257 of file Player.php.

◆ getInitialDragMultiplier()

pocketmine\entity\Living::getInitialDragMultiplier ( )
protectedinherited

Returns the percentage by which the entity's velocity is reduced per tick when moving through air. The entity's velocity is multiplied by 1 minus this value.

Returns
float 0-1

Reimplemented from pocketmine\entity\Entity.

Definition at line 129 of file Living.php.

◆ getInitialGravity()

pocketmine\entity\Living::getInitialGravity ( )
protectedinherited

Returns the downwards acceleration of the entity when falling, in blocks/tick².

Returns
float minimum 0

Reimplemented from pocketmine\entity\Entity.

Definition at line 131 of file Living.php.

◆ getInitialSizeInfo()

pocketmine\entity\Human::getInitialSizeInfo ( )
protectedinherited

Reimplemented from pocketmine\entity\Entity.

Definition at line 121 of file Human.php.

◆ getInventory()

pocketmine\entity\Human::getInventory ( )
inherited

Implements pocketmine\inventory\InventoryHolder.

Definition at line 231 of file Human.php.

◆ getItemCooldownExpiry()

pocketmine\player\Player::getItemCooldownExpiry ( Item  $item)

Returns the server tick on which the player's cooldown period expires for the given item.

Definition at line 698 of file Player.php.

◆ getItemUseDuration()

pocketmine\player\Player::getItemUseDuration ( )

Returns how long the player has been using their currently-held item for. Used for determining arrow shoot force for bows.

Definition at line 691 of file Player.php.

References pocketmine\server().

+ Here is the call graph for this function:

◆ getJumpVelocity()

pocketmine\entity\Living::getJumpVelocity ( )
inherited

Returns the initial upwards velocity of a jumping entity in blocks/tick, including additional velocity due to effects.

Definition at line 346 of file Living.php.

◆ getLanguage()

pocketmine\player\Player::getLanguage ( )

Implements pocketmine\command\CommandSender.

Definition at line 644 of file Player.php.

◆ getLastDamageCause()

pocketmine\entity\Entity::getLastDamageCause ( )
inherited

Definition at line 622 of file Entity.php.

◆ getLastPlayed()

pocketmine\player\Player::getLastPlayed ( )

TODO: not sure this should be nullable

Implements pocketmine\player\IPlayer.

Definition at line 438 of file Player.php.

◆ getLeaveMessage()

pocketmine\player\Player::getLeaveMessage ( )

Definition at line 391 of file Player.php.

◆ getLineOfSight()

pocketmine\entity\Living::getLineOfSight ( int  $maxDistance,
int  $maxLength = 0,
array  $transparent = [] 
)
inherited
Parameters
true[]$transparent@phpstan-param array<int, true> $transparent
Returns
Block[]

Definition at line 799 of file Living.php.

◆ getLocale()

pocketmine\player\Player::getLocale ( )

Returns the player's locale, e.g. en_US.

Definition at line 640 of file Player.php.

◆ getLocation()

pocketmine\entity\Entity::getLocation ( )
inherited

Definition at line 1334 of file Entity.php.

◆ getMaxAirSupplyTicks()

pocketmine\entity\Living::getMaxAirSupplyTicks ( )
inherited

Returns the maximum amount of air ticks the entity's air supply can contain.

Definition at line 758 of file Living.php.

◆ getMaxHealth()

pocketmine\entity\Living::getMaxHealth ( )
inherited

Reimplemented from pocketmine\entity\Entity.

Definition at line 212 of file Living.php.

◆ getMotion()

pocketmine\entity\Entity::getMotion ( )
inherited

Definition at line 1397 of file Entity.php.

◆ getMovementSpeed()

pocketmine\entity\Living::getMovementSpeed ( )
inherited

Definition at line 284 of file Living.php.

◆ getName()

pocketmine\player\Player::getName ( )

Gets the username

Implements pocketmine\command\CommandSender.

Definition at line 615 of file Player.php.

Referenced by pocketmine\command\defaults\ListCommand\execute().

+ Here is the caller graph for this function:

◆ getNameTag()

pocketmine\entity\Entity::getNameTag ( )
inherited

Definition at line 243 of file Entity.php.

◆ getNetworkProperties()

pocketmine\entity\Entity::getNetworkProperties ( )
inherited

Definition at line 630 of file Entity.php.

◆ getNetworkSession()

pocketmine\player\Player::getNetworkSession ( )

Definition at line 605 of file Player.php.

◆ getNetworkTypeId()

static pocketmine\entity\Human::getNetworkTypeId ( )
staticinherited

Reimplemented from pocketmine\entity\Entity.

Definition at line 101 of file Human.php.

◆ getOffHandInventory()

pocketmine\entity\Human::getOffHandInventory ( )
inherited

Definition at line 235 of file Human.php.

◆ getOffsetPosition()

pocketmine\entity\Human::getOffsetPosition ( Vector3  $vector3)
inherited

Reimplemented from pocketmine\entity\Entity.

Definition at line 527 of file Human.php.

◆ getOwningEntity()

pocketmine\entity\Entity::getOwningEntity ( )
inherited

Returns the owning entity, or null if the entity was not found.

Definition at line 405 of file Entity.php.

References pocketmine\server().

+ Here is the call graph for this function:

◆ getOwningEntityId()

pocketmine\entity\Entity::getOwningEntityId ( )
inherited

Returns the entity ID of the owning entity, or null if the entity doesn't have an owner.

Definition at line 398 of file Entity.php.

◆ getPermissionRecalculationCallbacks()

pocketmine\permission\Permissible::getPermissionRecalculationCallbacks ( )
inherited
Returns
ObjectSet|\Closure[] @phpstan-return ObjectSet<\Closure(array<string, bool> $changedPermissionsOldValues) : void>

Implemented in pocketmine\permission\PermissibleInternal.

◆ getPlayerInfo()

pocketmine\player\Player::getPlayerInfo ( )

Returns an object containing information about the player, such as their username, skin, and misc extra client-specific data.

Definition at line 407 of file Player.php.

◆ getPosition()

pocketmine\entity\Entity::getPosition ( )
inherited

Definition at line 1330 of file Entity.php.

◆ getSaveData()

pocketmine\player\Player::getSaveData ( )

Definition at line 2317 of file Player.php.

◆ getScale()

pocketmine\entity\Entity::getScale ( )
inherited

Definition at line 287 of file Entity.php.

◆ getScoreTag()

pocketmine\entity\Entity::getScoreTag ( )
inherited

Definition at line 278 of file Entity.php.

◆ getScreenLineHeight()

pocketmine\player\Player::getScreenLineHeight ( )

Returns the line height of the command-sender's screen. Used for determining sizes for command output pagination such as in the /help command. @phpstan-return positive-int

Implements pocketmine\command\CommandSender.

Definition at line 528 of file Player.php.

◆ getServer()

pocketmine\player\Player::getServer ( )

Implements pocketmine\command\CommandSender.

Definition at line 524 of file Player.php.

◆ getSize()

pocketmine\entity\Entity::getSize ( )
inherited

Definition at line 316 of file Entity.php.

◆ getSkin()

pocketmine\entity\Human::getSkin ( )
inherited

Returns a Skin object containing information about this human's skin.

Definition at line 148 of file Human.php.

◆ getSpawn()

pocketmine\player\Player::getSpawn ( )
Returns
Position

Definition at line 1032 of file Player.php.

References pocketmine\server().

+ Here is the call graph for this function:

◆ getTargetBlock()

pocketmine\entity\Living::getTargetBlock ( int  $maxDistance,
array  $transparent = [] 
)
inherited
Parameters
true[]$transparent@phpstan-param array<int, true> $transparent

Definition at line 840 of file Living.php.

◆ getTargetEntity()

pocketmine\entity\Entity::getTargetEntity ( )
inherited

Returns the entity's target entity, or null if not found. This is used for things like hostile mobs attacking entities, and for fishing rods reeling hit entities in.

Definition at line 436 of file Entity.php.

References pocketmine\server().

+ Here is the call graph for this function:

◆ getTargetEntityId()

pocketmine\entity\Entity::getTargetEntityId ( )
inherited

Returns the entity ID of the entity's target, or null if it doesn't have a target.

Definition at line 428 of file Entity.php.

◆ getUniqueId()

pocketmine\player\Player::getUniqueId ( )

Returns the player's UUID. This should be the preferred method to identify a player. It does not change if the player changes their username.

All players will have a UUID, regardless of whether they are logged into Xbox Live or not. However, note that non-XBL players can fake their UUIDs.

Reimplemented from pocketmine\entity\Human.

Definition at line 424 of file Player.php.

◆ getUsedChunks()

pocketmine\player\Player::getUsedChunks ( )
Returns
UsedChunkStatus[] chunkHash => status @phpstan-return array<int, UsedChunkStatus>

Definition at line 996 of file Player.php.

◆ getUsedChunkStatus()

pocketmine\player\Player::getUsedChunkStatus ( int  $chunkX,
int  $chunkZ 
)

Returns a usage status of the given chunk, or null if the player is not using the given chunk.

Definition at line 1003 of file Player.php.

◆ getViewDistance()

pocketmine\player\Player::getViewDistance ( )

Definition at line 574 of file Player.php.

◆ getViewers()

pocketmine\entity\Entity::getViewers ( )
inherited
Returns
Player[]

Definition at line 1480 of file Entity.php.

◆ getWorld()

pocketmine\entity\Entity::getWorld ( )
inherited

Definition at line 1338 of file Entity.php.

◆ getXpDropAmount()

pocketmine\player\Player::getXpDropAmount ( )

Returns the amount of XP this mob will drop on death.

Reimplemented from pocketmine\entity\Human.

Definition at line 1217 of file Player.php.

◆ getXpManager()

pocketmine\entity\Human::getXpManager ( )
inherited

Definition at line 209 of file Human.php.

◆ getXuid()

pocketmine\player\Player::getXuid ( )

If the player is logged into Xbox Live, returns their Xbox user ID (XUID) as a string. Returns an empty string if the player is not logged into Xbox Live.

Definition at line 413 of file Player.php.

◆ handleMovement()

pocketmine\player\Player::handleMovement ( Vector3  $newPos)

Attempts to move the player to the given coordinates. Unless you have some particularly specialized logic, you probably want to use teleport() instead of this.

This is used for processing movements sent by the player over network.

Parameters
Vector3$newPosCoordinates of the player's feet, centered horizontally at the base of their bounding box.

Definition at line 1269 of file Player.php.

◆ hasAutoJump()

pocketmine\player\Player::hasAutoJump ( )

Definition at line 514 of file Player.php.

◆ hasBlockCollision()

pocketmine\player\Player::hasBlockCollision ( )

Returns whether blocks may obstruct the player's movement. If false, the player can move through any block unobstructed.

Definition at line 491 of file Player.php.

◆ hasFiniteResources()

pocketmine\player\Player::hasFiniteResources ( )

TODO: make this a dynamic ability instead of being hardcoded

Definition at line 1205 of file Player.php.

Referenced by pocketmine\entity\object\Painting\onDeath().

+ Here is the caller graph for this function:

◆ hasGravity()

pocketmine\entity\Entity::hasGravity ( )
inherited

Definition at line 815 of file Entity.php.

◆ hasItemCooldown()

pocketmine\player\Player::hasItemCooldown ( Item  $item)

Returns whether the player has a cooldown period left before it can use the given item again.

Definition at line 706 of file Player.php.

◆ hasMovementUpdate()

pocketmine\entity\Entity::hasMovementUpdate ( )
inherited

Returns whether the entity needs a movement update on the next tick.

Reimplemented in pocketmine\entity\object\Painting, and pocketmine\entity\projectile\Projectile.

Definition at line 1055 of file Entity.php.

◆ hasNoClientPredictions()

pocketmine\entity\Entity::hasNoClientPredictions ( )
inherited

Returns whether clients may predict this entity's behaviour and movement. Used for things like water movement, burning, and movement smoothing (interpolation).

Definition at line 330 of file Entity.php.

◆ hasPermission()

pocketmine\permission\Permissible::hasPermission ( Permission|string  $name)
inherited

Returns the permission value if overridden, or the default value if not

Implemented in pocketmine\permission\PermissibleInternal.

◆ hasPlayedBefore()

pocketmine\player\Player::hasPlayedBefore ( )

Implements pocketmine\player\IPlayer.

Definition at line 442 of file Player.php.

◆ hasReceivedChunk()

pocketmine\player\Player::hasReceivedChunk ( int  $chunkX,
int  $chunkZ 
)

Returns whether the target chunk has been sent to this player.

Definition at line 1010 of file Player.php.

◆ hasValidCustomSpawn()

pocketmine\player\Player::hasValidCustomSpawn ( )

Definition at line 1042 of file Player.php.

◆ heal()

pocketmine\entity\Entity::heal ( EntityRegainHealthEvent  $source)
inherited

Definition at line 548 of file Entity.php.

◆ hidePlayer()

pocketmine\player\Player::hidePlayer ( Player  $player)

Definition at line 543 of file Player.php.

◆ initEntity()

pocketmine\player\Player::initEntity ( CompoundTag  $nbt)
protected

Reimplemented from pocketmine\entity\Human.

Definition at line 353 of file Player.php.

◆ initHumanData()

pocketmine\player\Player::initHumanData ( CompoundTag  $nbt)
protected

For Human entities which are not players, sets their properties such as nametag, skin and UUID from NBT.

Reimplemented from pocketmine\entity\Human.

Definition at line 339 of file Player.php.

◆ interactBlock()

pocketmine\player\Player::interactBlock ( Vector3  $pos,
int  $face,
Vector3  $clickOffset 
)

Touches the block at the given position with the currently-held item.

Returns
bool if it did something

Definition at line 1812 of file Player.php.

◆ interactEntity()

pocketmine\player\Player::interactEntity ( Entity  $entity,
Vector3  $clickPos 
)

Interacts with the given entity using the currently-held item.

Definition at line 1922 of file Player.php.

◆ internalSetGameMode()

pocketmine\player\Player::internalSetGameMode ( GameMode  $gameMode)
protected

Definition at line 1117 of file Player.php.

◆ isAdventure()

pocketmine\player\Player::isAdventure ( bool  $literal = false)

NOTE: Because Adventure and Spectator Mode share some similar behaviour, this method will also return true if the player is in Spectator Mode. Supply the $literal parameter as true to force a literal Adventure Mode check.

Parameters
bool$literalwhether a literal check should be performed

Definition at line 1194 of file Player.php.

◆ isAlive()

pocketmine\entity\Entity::isAlive ( )
inherited

Definition at line 579 of file Entity.php.

◆ isAuthenticated()

pocketmine\player\Player::isAuthenticated ( )

Definition at line 399 of file Player.php.

◆ isBreathing()

pocketmine\entity\Living::isBreathing ( )
inherited

Returns whether the entity is currently breathing or not. If this is false, the entity's air supply will be used.

Definition at line 726 of file Living.php.

◆ isClosed()

pocketmine\entity\Entity::isClosed ( )
inherited

Returns whether the entity has been "closed".

Definition at line 1578 of file Entity.php.

◆ isConnected()

pocketmine\player\Player::isConnected ( )

Definition at line 601 of file Player.php.

◆ isCreative()

pocketmine\player\Player::isCreative ( bool  $literal = false)

NOTE: Because Creative and Spectator Mode share some similar behaviour, this method will also return true if the player is in Spectator Mode. Supply the $literal parameter as true to force a literal Creative Mode check.

Parameters
bool$literalwhether a literal check should be performed

Definition at line 1184 of file Player.php.

◆ isFireProof()

pocketmine\entity\Entity::isFireProof ( )
inherited

Definition at line 713 of file Entity.php.

◆ isFlaggedForDespawn()

pocketmine\entity\Entity::isFlaggedForDespawn ( )
inherited

Definition at line 1571 of file Entity.php.

◆ isFlying()

pocketmine\player\Player::isFlying ( )

Definition at line 503 of file Player.php.

◆ isGliding()

pocketmine\entity\Living::isGliding ( )
inherited

Definition at line 252 of file Living.php.

◆ isInsideOfSolid()

pocketmine\entity\Entity::isInsideOfSolid ( )
inherited

Definition at line 1130 of file Entity.php.

◆ isInvisible()

pocketmine\entity\Entity::isInvisible ( )
inherited

Definition at line 347 of file Entity.php.

◆ isNameTagAlwaysVisible()

pocketmine\entity\Entity::isNameTagAlwaysVisible ( )
inherited

Definition at line 251 of file Entity.php.

◆ isNameTagVisible()

pocketmine\entity\Entity::isNameTagVisible ( )
inherited

Definition at line 247 of file Entity.php.

◆ isOnFire()

pocketmine\entity\Entity::isOnFire ( )
inherited

Definition at line 679 of file Entity.php.

◆ isOnGround()

pocketmine\entity\Entity::isOnGround ( )
inherited

Definition at line 1430 of file Entity.php.

◆ isOnline()

pocketmine\player\Player::isOnline ( )

Definition at line 597 of file Player.php.

◆ isPermissionSet()

pocketmine\permission\Permissible::isPermissionSet ( Permission|string  $name)
inherited

Checks if this instance has a permission overridden

Implemented in pocketmine\permission\PermissibleInternal.

◆ isSilent()

pocketmine\entity\Entity::isSilent ( )
inherited

Definition at line 356 of file Entity.php.

◆ isSleeping()

pocketmine\player\Player::isSleeping ( )

Definition at line 1066 of file Player.php.

◆ isSneaking()

pocketmine\entity\Living::isSneaking ( )
inherited

Definition at line 228 of file Living.php.

◆ isSpectator()

pocketmine\player\Player::isSpectator ( )

Definition at line 1198 of file Player.php.

◆ isSprinting()

pocketmine\entity\Living::isSprinting ( )
inherited

Definition at line 238 of file Living.php.

◆ isSurvival()

pocketmine\player\Player::isSurvival ( bool  $literal = false)

NOTE: Because Survival and Adventure Mode share some similar behaviour, this method will also return true if the player is in Adventure Mode. Supply the $literal parameter as true to force a literal Survival Mode check.

Parameters
bool$literalwhether a literal check should be performed

Definition at line 1174 of file Player.php.

◆ isSwimming()

pocketmine\entity\Living::isSwimming ( )
inherited

Definition at line 262 of file Living.php.

◆ isUnderwater()

pocketmine\entity\Entity::isUnderwater ( )
inherited

Definition at line 1119 of file Entity.php.

◆ isUsingChunk()

pocketmine\player\Player::isUsingChunk ( int  $chunkX,
int  $chunkZ 
)

Returns whether the player is using the chunk with the given coordinates, irrespective of whether the chunk has been sent yet.

Definition at line 988 of file Player.php.

◆ isUsingItem()

pocketmine\player\Player::isUsingItem ( )

Returns whether the player is currently using an item (right-click and hold).

Definition at line 678 of file Player.php.

◆ isValidUserName()

static pocketmine\player\Player::isValidUserName ( ?string  $name)
static

Validates the given username.

Definition at line 199 of file Player.php.

Referenced by pocketmine\command\defaults\DeopCommand\execute(), pocketmine\command\defaults\OpCommand\execute(), and pocketmine\command\defaults\WhitelistCommand\execute().

+ Here is the caller graph for this function:

◆ jump()

pocketmine\player\Player::jump ( )

Called when the entity jumps from the ground. This method adds upwards velocity to the entity.

Reimplemented from pocketmine\entity\Human.

Definition at line 1388 of file Player.php.

◆ kick()

pocketmine\player\Player::kick ( Translatable|string  $reason = "",
Translatable|string|null  $quitMessage = null,
Translatable|string|null  $disconnectScreenMessage = null 
)

Kicks a player from the server

Parameters
Translatable | string$reasonShown in the server log - this should be a short one-line message
Translatable | string | null$quitMessageMessage to broadcast to online players (null will use default)
Translatable | string | null$disconnectScreenMessageShown on the player's disconnection screen (null will use the reason)

Definition at line 2181 of file Player.php.

◆ kill()

pocketmine\entity\Entity::kill ( )
inherited

Definition at line 557 of file Entity.php.

◆ knockBack()

pocketmine\entity\Living::knockBack ( float  $x,
float  $z,
float  $force = self::DEFAULT_KNOCKBACK_FORCE,
?float  $verticalLimit = self::DEFAULT_KNOCKBACK_VERTICAL_LIMIT 
)
inherited

Definition at line 585 of file Living.php.

◆ lookAt()

pocketmine\entity\Living::lookAt ( Vector3  $target)
inherited

Changes the entity's yaw and pitch to make it look at the specified Vector3 position. For mobs, this will cause their heads to turn.

Definition at line 853 of file Living.php.

◆ missSwing()

pocketmine\player\Player::missSwing ( )

Performs actions associated with the attack action (left-click) without a target entity. Under normal circumstances, this will just play the no-damage attack sound and the arm-swing animation.

Definition at line 1910 of file Player.php.

◆ move()

pocketmine\entity\Entity::move ( float  $dx,
float  $dy,
float  $dz 
)
protectedinherited

Definition at line 1136 of file Entity.php.

◆ nextRuntimeId()

static pocketmine\entity\Entity::nextRuntimeId ( )
staticinherited

Returns a new runtime entity ID for a new entity.

Definition at line 101 of file Entity.php.

Referenced by pocketmine\world\particle\FloatingTextParticle\encode().

+ Here is the caller graph for this function:

◆ onAirExpired()

pocketmine\entity\Living::onAirExpired ( )
inherited

Called when the entity's air supply ticks reaches -20 or lower. The entity will usually take damage at this point and then the supply is reset to 0, so this method will be called roughly every second.

Reimplemented in pocketmine\entity\WaterAnimal.

Definition at line 774 of file Living.php.

◆ onBlockChanged()

pocketmine\world\ChunkListener::onBlockChanged ( Vector3  $block)
inherited

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

Implemented in pocketmine\network\mcpe\cache\ChunkCache.

◆ onChunkChanged()

onChunkUnloaded as pocketmine\player\Player::onChunkChanged ( int  $chunkX,
int  $chunkZ,
Chunk  $chunk 
)

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

Implements pocketmine\world\ChunkListener.

Definition at line 2699 of file Player.php.

◆ onChunkLoaded()

pocketmine\world\ChunkListener::onChunkLoaded ( int  $chunkX,
int  $chunkZ,
Chunk  $chunk 
)
inherited

This method will be called when a registered chunk is loaded

◆ onChunkPopulated()

pocketmine\world\ChunkListener::onChunkPopulated ( int  $chunkX,
int  $chunkZ,
Chunk  $chunk 
)
inherited

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

◆ onChunkUnloaded()

pocketmine\player\Player::onChunkUnloaded ( int  $chunkX,
int  $chunkZ,
Chunk  $chunk 
)

This method will be called when a registered chunk is unloaded

Implements pocketmine\world\ChunkListener.

Definition at line 2707 of file Player.php.

◆ onCollideWithPlayer()

pocketmine\entity\Entity::onCollideWithPlayer ( Player  $player)
inherited

Definition at line 1108 of file Entity.php.

◆ onDeath()

pocketmine\player\Player::onDeath ( )
protected

Override this to do actions on death.

Reimplemented from pocketmine\entity\Living.

Definition at line 2348 of file Player.php.

◆ onDeathUpdate()

pocketmine\player\Player::onDeathUpdate ( int  $tickDiff)
protected

Called to tick entities while dead. Returns whether the entity should be flagged for despawn yet.

Reimplemented from pocketmine\entity\Living.

Definition at line 2382 of file Player.php.

◆ onDispose()

pocketmine\player\Player::onDispose ( )
protected

Called when the entity is disposed to clean up things like viewers. This SHOULD NOT destroy internal state, because it may be needed by descendent classes.

Reimplemented from pocketmine\entity\Human.

Definition at line 2281 of file Player.php.

◆ onFirstUpdate()

pocketmine\entity\Entity::onFirstUpdate ( int  $currentTick)
protectedinherited

Called from onUpdate() on the first tick of a new entity. This is called before any movement processing or main ticking logic. Use this to fire any events related to spawning the entity.

Reimplemented in pocketmine\entity\object\ItemEntity.

Definition at line 961 of file Entity.php.

◆ onFormSubmit()

pocketmine\player\Player::onFormSubmit ( int  $formId,
mixed  $responseData 
)

Definition at line 2136 of file Player.php.

◆ onHitGround()

pocketmine\entity\Living::onHitGround ( )
protectedinherited

Called when a falling entity hits the ground.

Reimplemented from pocketmine\entity\Entity.

Definition at line 363 of file Living.php.

◆ onInteract()

pocketmine\entity\Entity::onInteract ( Player  $player,
Vector3  $clickPos 
)
inherited

Called when interacted or tapped by a Player. Returns whether something happened as a result of the interaction.

Definition at line 1115 of file Entity.php.

◆ onNearbyBlockChange()

pocketmine\entity\Entity::onNearbyBlockChange ( )
inherited

Definition at line 1029 of file Entity.php.

◆ onPostDisconnect()

pocketmine\player\Player::onPostDisconnect ( Translatable|string  $reason,
Translatable|string|null  $quitMessage 
)

Definition at line 2230 of file Player.php.

◆ onRandomUpdate()

pocketmine\entity\Entity::onRandomUpdate ( )
inherited

Called when a random update is performed on the chunk the entity is in. This happens when the chunk is within the ticking chunk range of a player (or chunk loader).

Reimplemented in pocketmine\entity\object\Painting.

Definition at line 1038 of file Entity.php.

◆ onUpdate()

pocketmine\player\Player::onUpdate ( int  $currentTick)

Reimplemented from pocketmine\entity\Entity.

Definition at line 1411 of file Player.php.

◆ openSignEditor()

pocketmine\player\Player::openSignEditor ( Vector3  $position)

Opens the player's sign editor GUI for the sign at the given position. TODO: add support for editing the rear side of the sign (not currently supported due to technical limitations)

Definition at line 2684 of file Player.php.

◆ orderChunks()

pocketmine\player\Player::orderChunks ( )
protected

Calculates which new chunks this player needs to use, and which currently-used chunks it needs to stop using. This is based on factors including the player's current render radius and current position.

Definition at line 939 of file Player.php.

◆ parseSkinNBT()

static pocketmine\entity\Human::parseSkinNBT ( CompoundTag  $nbt)
staticinherited
Exceptions
InvalidSkinException
SavedDataLoadingException

Definition at line 127 of file Human.php.

◆ pickBlock()

pocketmine\player\Player::pickBlock ( Vector3  $pos,
bool  $addTileNBT 
)

Definition at line 1691 of file Player.php.

◆ processMostRecentMovements()

pocketmine\player\Player::processMostRecentMovements ( )
protected

Fires movement events and synchronizes player movement, every tick.

Definition at line 1325 of file Player.php.

◆ recalculateBoundingBox()

pocketmine\entity\Entity::recalculateBoundingBox ( )
protectedinherited

Definition at line 303 of file Entity.php.

◆ recalculatePermissions()

pocketmine\permission\Permissible::recalculatePermissions ( )
inherited
Returns
bool[] changed permission name => old value @phpstan-return array<string, bool>

Implemented in pocketmine\permission\PermissibleInternal.

◆ regenerateEnchantmentSeed()

pocketmine\entity\Human::regenerateEnchantmentSeed ( )
inherited

Definition at line 221 of file Human.php.

◆ releaseHeldItem()

pocketmine\player\Player::releaseHeldItem ( )

Releases the held item, for example to fire a bow. This should be preceded by a call to useHeldItem().

Returns
bool if it did something.

Definition at line 1668 of file Player.php.

◆ removeCurrentWindow()

pocketmine\player\Player::removeCurrentWindow ( )

Definition at line 2652 of file Player.php.

◆ removePermanentInventories()

pocketmine\player\Player::removePermanentInventories ( )
protected

Definition at line 2673 of file Player.php.

◆ removeTitles()

pocketmine\player\Player::removeTitles ( )

Removes the title from the client's screen.

Definition at line 2069 of file Player.php.

◆ requestChunks()

pocketmine\player\Player::requestChunks ( )
protected

Requests chunks from the world to be sent, up to a set limit every tick. This operates on the results of the most recent chunk order.

Definition at line 794 of file Player.php.

◆ resetFallDistance()

pocketmine\player\Player::resetFallDistance ( )

Reimplemented from pocketmine\entity\Entity.

Definition at line 569 of file Player.php.

◆ resetItemCooldown()

pocketmine\player\Player::resetItemCooldown ( Item  $item,
?int  $ticks = null 
)

Resets the player's cooldown time for the given item back to the maximum.

Definition at line 714 of file Player.php.

References pocketmine\server().

+ Here is the call graph for this function:

◆ resetLastMovements()

pocketmine\entity\Entity::resetLastMovements ( )
protectedinherited

Definition at line 1392 of file Entity.php.

◆ resetTitles()

pocketmine\player\Player::resetTitles ( )

Resets the title duration settings to defaults and removes any existing titles.

Definition at line 2076 of file Player.php.

◆ respawn()

pocketmine\player\Player::respawn ( )

Definition at line 2387 of file Player.php.

◆ respawnToAll()

pocketmine\entity\Entity::respawnToAll ( )
inherited

Definition at line 1530 of file Entity.php.

◆ revertMovement()

pocketmine\player\Player::revertMovement ( Location  $from)
protected

Definition at line 1379 of file Player.php.

◆ save()

pocketmine\player\Player::save ( )

Handles player data saving

Definition at line 2344 of file Player.php.

References pocketmine\server().

+ Here is the call graph for this function:

◆ saveNBT()

pocketmine\entity\Human::saveNBT ( )
inherited

Reimplemented from pocketmine\entity\Living.

Definition at line 411 of file Human.php.

◆ scheduleUpdate()

pocketmine\entity\Entity::scheduleUpdate ( )
finalinherited

Definition at line 1022 of file Entity.php.

◆ selectHotbarSlot()

pocketmine\player\Player::selectHotbarSlot ( int  $hotbarSlot)

Definition at line 1531 of file Player.php.

◆ sendActionBarMessage()

pocketmine\player\Player::sendActionBarMessage ( string  $message)

Adds small text to the user's screen.

Definition at line 2062 of file Player.php.

◆ sendData()

pocketmine\player\Player::sendData ( ?array  $targets,
?array  $data = null 
)
Parameters
Player[] | null$targets
MetadataProperty[]$dataProperly formatted entity data, defaults to everything

@phpstan-param array<int, MetadataProperty> $data

Reimplemented from pocketmine\entity\Entity.

Definition at line 2483 of file Player.php.

◆ sendForm()

pocketmine\player\Player::sendForm ( Form  $form)

Sends a Form to the player, or queue to send it if a form is already open.

Exceptions

InvalidArgumentException

Definition at line 2129 of file Player.php.

◆ sendJukeboxPopup()

pocketmine\player\Player::sendJukeboxPopup ( Translatable|string  $message)

Definition at line 2100 of file Player.php.

◆ sendMessage()

pocketmine\player\Player::sendMessage ( Translatable|string  $message)

Sends a direct chat message to a player

Implements pocketmine\command\CommandSender.

Definition at line 2096 of file Player.php.

◆ sendPopup()

pocketmine\player\Player::sendPopup ( string  $message)

Sends a popup message to the player

TODO: add translation type popups

Definition at line 2109 of file Player.php.

◆ sendPosition()

pocketmine\player\Player::sendPosition ( Vector3  $pos,
?float  $yaw = null,
?float  $pitch = null,
int  $mode = MovePlayerPacket::MODE_NORMAL 
)
protected

TODO: remove this

Definition at line 2510 of file Player.php.

◆ sendSkin()

pocketmine\player\Player::sendSkin ( ?array  $targets = null)

{Sends the human's skin to the specified list of players. If null is given for targets, the skin will be sent to all viewers.

Parameters
Player[] | null$targets
}

If null is given, will additionally send the skin to the player itself as well as its viewers.

Reimplemented from pocketmine\entity\Human.

Definition at line 671 of file Player.php.

References pocketmine\server().

+ Here is the call graph for this function:

◆ sendSpawnPacket()

pocketmine\entity\Human::sendSpawnPacket ( Player  $player)
protectedinherited

Called by spawnTo() to send whatever packets needed to spawn the entity to the client.

Reimplemented from pocketmine\entity\Living.

Definition at line 481 of file Human.php.

◆ sendSubTitle()

pocketmine\player\Player::sendSubTitle ( string  $subtitle)

Sets the subtitle message, without sending a title.

Definition at line 2055 of file Player.php.

◆ sendTip()

pocketmine\player\Player::sendTip ( string  $message)

Definition at line 2113 of file Player.php.

◆ sendTitle()

pocketmine\player\Player::sendTitle ( string  $title,
string  $subtitle = "",
int  $fadeIn = -1,
int  $stay = -1,
int  $fadeOut = -1 
)

Adds a title text to the user's screen, with an optional subtitle.

Parameters
int$fadeInDuration in ticks for fade-in. If -1 is given, client-sided defaults will be used.
int$stayDuration in ticks to stay on screen for
int$fadeOutDuration in ticks for fade-out.

Definition at line 2044 of file Player.php.

◆ sendToastNotification()

pocketmine\player\Player::sendToastNotification ( string  $title,
string  $body 
)

Sends a toast message to the player, or queue to send it if a toast message is already shown.

Definition at line 2120 of file Player.php.

◆ setAbsorption()

pocketmine\entity\Living::setAbsorption ( float  $absorption)
inherited

Definition at line 224 of file Living.php.

◆ setAirSupplyTicks()

pocketmine\entity\Living::setAirSupplyTicks ( int  $ticks)
inherited

Sets the number of air ticks left in the entity's air supply.

Definition at line 750 of file Living.php.

◆ setAllowFlight()

pocketmine\player\Player::setAllowFlight ( bool  $value)

Sets whether the player is allowed to toggle flight mode.

If set to false, the player will be locked in its current flight mode (flying/not flying), and attempts by the player to enter or exit flight mode will be prevented.

Note: Setting this to false DOES NOT change whether the player is currently flying. Use Player::setFlying() for that purpose.

Definition at line 455 of file Player.php.

◆ setAutoJump()

pocketmine\player\Player::setAutoJump ( bool  $value)

Definition at line 507 of file Player.php.

◆ setBasePermission()

pocketmine\permission\Permissible::setBasePermission ( Permission|string  $name,
bool  $grant 
)
inherited

Assigns a baseline permission to the permissible. This is always calculated before anything else, which means that permissions set using addAttachment() will always override base permissions. You probably don't want to use this if you're not assigning (denying) operator permissions.

Implemented in pocketmine\permission\PermissibleInternal.

◆ setBreathing()

pocketmine\entity\Living::setBreathing ( bool  $value = true)
inherited

Sets whether the entity is currently breathing. If false, it will cause the entity's air supply to be used. For players, this also shows the oxygen bar.

Definition at line 734 of file Living.php.

◆ setCanClimb()

pocketmine\entity\Entity::setCanClimb ( bool  $value = true)
inherited

Sets whether the entity is able to climb climbable blocks.

Definition at line 375 of file Entity.php.

◆ setCanClimbWalls()

pocketmine\entity\Entity::setCanClimbWalls ( bool  $value = true)
inherited

Sets whether the entity is climbing a block. If true, the entity can climb anything.

Definition at line 390 of file Entity.php.

◆ setCanSaveWithChunk()

pocketmine\player\Player::setCanSaveWithChunk ( bool  $value)

Sets whether this entity will be saved when its chunk is unloaded. This can be used to prevent the entity being saved to disk.

Reimplemented from pocketmine\entity\Entity.

Definition at line 2313 of file Player.php.

◆ setCreativeInventory()

pocketmine\player\Player::setCreativeInventory ( CreativeInventory  $inventory)

To set a custom creative inventory, you need to make a clone of a CreativeInventory instance.

Definition at line 2572 of file Player.php.

◆ setCurrentWindow()

pocketmine\player\Player::setCurrentWindow ( Inventory  $inventory)

Opens an inventory window to the player. Returns if it was successful.

Definition at line 2630 of file Player.php.

◆ setDisplayName()

pocketmine\player\Player::setDisplayName ( string  $name)

Definition at line 626 of file Player.php.

◆ setEnchantmentSeed()

pocketmine\entity\Human::setEnchantmentSeed ( int  $seed)
inherited

Definition at line 217 of file Human.php.

◆ setFallDistance()

pocketmine\entity\Entity::setFallDistance ( float  $fallDistance)
inherited

Definition at line 1067 of file Entity.php.

◆ setFireTicks()

pocketmine\entity\Entity::setFireTicks ( int  $fireTicks)
inherited
Exceptions

InvalidArgumentException

Definition at line 698 of file Entity.php.

◆ setFlying()

pocketmine\player\Player::setFlying ( bool  $value)

Definition at line 495 of file Player.php.

◆ setForceMovementUpdate()

pocketmine\entity\Entity::setForceMovementUpdate ( bool  $value = true)
finalinherited

Flags the entity as needing a movement update on the next tick. Setting this forces a movement update even if the entity's motion is zero. Used to trigger movement updates when blocks change near entities.

Definition at line 1046 of file Entity.php.

◆ setGamemode()

pocketmine\player\Player::setGamemode ( GameMode  $gm)

Sets the provided gamemode.

Definition at line 1145 of file Player.php.

◆ setGliding()

pocketmine\entity\Living::setGliding ( bool  $value = true)
inherited

Definition at line 256 of file Living.php.

◆ setGravity()

pocketmine\entity\Entity::setGravity ( float  $gravity)
inherited

Definition at line 810 of file Entity.php.

◆ setHasBlockCollision()

pocketmine\player\Player::setHasBlockCollision ( bool  $value)

Sets whether the player's movement may be obstructed by blocks with collision boxes. If set to false, the player can move through any block unobstructed.

Note: Enabling flight mode in conjunction with this is recommended. A non-flying player will simply fall through the ground into the void.

See also
Player::setFlying()

Definition at line 480 of file Player.php.

◆ setHasGravity()

pocketmine\entity\Entity::setHasGravity ( bool  $v = true)
inherited

Definition at line 819 of file Entity.php.

◆ setHealth()

pocketmine\entity\Living::setHealth ( float  $amount)
inherited

Sets the health of the Entity. This won't send any update to the players

Reimplemented from pocketmine\entity\Entity.

Definition at line 203 of file Living.php.

Referenced by pocketmine\entity\effect\HealthBoostEffect\remove().

+ Here is the caller graph for this function:

◆ setInvisible()

pocketmine\entity\Entity::setInvisible ( bool  $value = true)
inherited

Definition at line 351 of file Entity.php.

◆ setLastDamageCause()

pocketmine\entity\Entity::setLastDamageCause ( EntityDamageEvent  $type)
inherited

Definition at line 618 of file Entity.php.

◆ setMaxAirSupplyTicks()

pocketmine\entity\Living::setMaxAirSupplyTicks ( int  $ticks)
inherited

Sets the maximum amount of air ticks the air supply can hold.

Definition at line 765 of file Living.php.

◆ setMaxHealth()

pocketmine\entity\Living::setMaxHealth ( int  $amount)
inherited

Reimplemented from pocketmine\entity\Entity.

Definition at line 216 of file Living.php.

◆ setMotion()

pocketmine\player\Player::setMotion ( Vector3  $motion)

Reimplemented from pocketmine\entity\Entity.

Definition at line 1393 of file Player.php.

◆ setMovementSpeed()

pocketmine\entity\Living::setMovementSpeed ( float  $v,
bool  $fit = false 
)
inherited

Definition at line 288 of file Living.php.

◆ setNameTag()

pocketmine\entity\Entity::setNameTag ( string  $name)
inherited

Definition at line 263 of file Entity.php.

◆ setNameTagAlwaysVisible()

pocketmine\entity\Entity::setNameTagAlwaysVisible ( bool  $value = true)
inherited

Definition at line 273 of file Entity.php.

◆ setNameTagVisible()

pocketmine\entity\Entity::setNameTagVisible ( bool  $value = true)
inherited

Definition at line 268 of file Entity.php.

◆ setNoClientPredictions()

pocketmine\entity\Entity::setNoClientPredictions ( bool  $value = true)
inherited

Things such as movement in water, burning, etc. may be predicted by the client. This is sometimes not desirable, since server-side logic may differ from client-side prediction. However, things like movement smoothing (interpolation) are also controlled by this, so it should be used with care.

Setting this flag will also disable player movement inputs, but this should not be relied on, as cheat clients will be able to bypass it.

Definition at line 342 of file Entity.php.

◆ setOnFire()

pocketmine\entity\Living::setOnFire ( int  $seconds)
inherited

Reimplemented from pocketmine\entity\Entity.

Definition at line 417 of file Living.php.

◆ setOwningEntity()

pocketmine\entity\Entity::setOwningEntity ( ?Entity  $owner)
inherited

Sets the owner of the entity. Passing null will remove the current owner.

Exceptions

InvalidArgumentException if the supplied entity is not valid

Definition at line 414 of file Entity.php.

◆ setPosition()

pocketmine\player\Player::setPosition ( Vector3  $pos)
protected

Reimplemented from pocketmine\entity\Entity.

Definition at line 730 of file Player.php.

◆ setPositionAndRotation()

pocketmine\entity\Entity::setPositionAndRotation ( Vector3  $pos,
float  $yaw,
float  $pitch 
)
protectedinherited

Definition at line 1382 of file Entity.php.

◆ setRotation()

pocketmine\entity\Entity::setRotation ( float  $yaw,
float  $pitch 
)
inherited

Definition at line 1374 of file Entity.php.

◆ setScale()

pocketmine\entity\Entity::setScale ( float  $value)
inherited

Definition at line 291 of file Entity.php.

◆ setScoreTag()

pocketmine\entity\Entity::setScoreTag ( string  $score)
inherited

Definition at line 282 of file Entity.php.

◆ setScreenLineHeight()

pocketmine\player\Player::setScreenLineHeight ( ?int  $height)

Sets the line height used for command output pagination for this command sender. null will reset it to default. @phpstan-param positive-int|null $height

Implements pocketmine\command\CommandSender.

Definition at line 532 of file Player.php.

◆ setSilent()

pocketmine\entity\Entity::setSilent ( bool  $value = true)
inherited

Definition at line 360 of file Entity.php.

◆ setSize()

pocketmine\entity\Entity::setSize ( EntitySizeInfo  $size)
protectedinherited

Definition at line 320 of file Entity.php.

◆ setSkin()

pocketmine\entity\Human::setSkin ( Skin  $skin)
inherited

Sets the human's skin. This will not send any update to viewers, you need to do that manually using sendSkin.

Definition at line 156 of file Human.php.

◆ setSneaking()

pocketmine\entity\Living::setSneaking ( bool  $value = true)
inherited

Definition at line 232 of file Living.php.

◆ setSpawn()

pocketmine\player\Player::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 | null$pos

Definition at line 1052 of file Player.php.

◆ setSprinting()

pocketmine\entity\Living::setSprinting ( bool  $value = true)
inherited

Definition at line 242 of file Living.php.

◆ setSwimming()

pocketmine\entity\Living::setSwimming ( bool  $value = true)
inherited

Definition at line 266 of file Living.php.

◆ setTargetEntity()

pocketmine\entity\Entity::setTargetEntity ( ?Entity  $target)
inherited

Sets the entity's target entity. Passing null will remove the current target.

Exceptions

InvalidArgumentException if the target entity is not valid

Definition at line 445 of file Entity.php.

◆ setTitleDuration()

pocketmine\player\Player::setTitleDuration ( int  $fadeIn,
int  $stay,
int  $fadeOut 
)

Sets the title duration.

Parameters
int$fadeInTitle fade-in time in ticks.
int$stayTitle stay time in ticks.
int$fadeOutTitle fade-out time in ticks.

Definition at line 2087 of file Player.php.

◆ setUsingItem()

pocketmine\player\Player::setUsingItem ( bool  $value)

Definition at line 682 of file Player.php.

◆ setViewDistance()

pocketmine\player\Player::setViewDistance ( int  $distance)

Definition at line 578 of file Player.php.

◆ showPlayer()

pocketmine\player\Player::showPlayer ( Player  $player)

Definition at line 551 of file Player.php.

◆ sleepOn()

pocketmine\player\Player::sleepOn ( Vector3  $pos)

Definition at line 1070 of file Player.php.

◆ spawnEntitiesOnAllChunks()

pocketmine\player\Player::spawnEntitiesOnAllChunks ( )
protected

Definition at line 773 of file Player.php.

◆ spawnEntitiesOnChunk()

pocketmine\player\Player::spawnEntitiesOnChunk ( int  $chunkX,
int  $chunkZ 
)
protected

Definition at line 782 of file Player.php.

◆ spawnTo()

pocketmine\player\Player::spawnTo ( Player  $player)

Reimplemented from pocketmine\entity\Human.

Definition at line 518 of file Player.php.

◆ spawnToAll()

pocketmine\entity\Entity::spawnToAll ( )
inherited

Definition at line 1521 of file Entity.php.

◆ startDeathAnimation()

pocketmine\entity\Living::startDeathAnimation ( )
protectedinherited

Definition at line 633 of file Living.php.

◆ stopBreakBlock()

pocketmine\player\Player::stopBreakBlock ( Vector3  $pos)

Definition at line 1775 of file Player.php.

◆ stopSleep()

pocketmine\player\Player::stopSleep ( )

Definition at line 1095 of file Player.php.

◆ syncNetworkData()

pocketmine\player\Player::syncNetworkData ( EntityMetadataCollection  $properties)
protected

Reimplemented from pocketmine\entity\Living.

Definition at line 2473 of file Player.php.

◆ teleport()

pocketmine\player\Player::teleport ( Vector3  $pos,
?float  $yaw = null,
?float  $pitch = null 
)
Parameters
Vector3 | Position | Location$pos

Reimplemented from pocketmine\entity\Entity.

Definition at line 2516 of file Player.php.

◆ toggleFlight()

pocketmine\player\Player::toggleFlight ( bool  $fly)

Definition at line 1974 of file Player.php.

◆ toggleGlide()

pocketmine\player\Player::toggleGlide ( bool  $glide)

Definition at line 1990 of file Player.php.

◆ toggleSneak()

pocketmine\player\Player::toggleSneak ( bool  $sneak)

Definition at line 1961 of file Player.php.

◆ toggleSprint()

pocketmine\player\Player::toggleSprint ( bool  $sprint)

Definition at line 1948 of file Player.php.

◆ toggleSwim()

pocketmine\player\Player::toggleSwim ( bool  $swim)

Definition at line 2003 of file Player.php.

◆ transfer()

pocketmine\player\Player::transfer ( string  $address,
int  $port = 19132,
Translatable|string|null  $message = null 
)

Transfers a player to another server.

Parameters
string$addressThe IP address or hostname of the destination server
int$portThe destination port, defaults to 19132
Translatable | string | null$messageMessage to show in the console when closing the player, null will use the default message
Returns
bool if transfer was successful.

Definition at line 2163 of file Player.php.

◆ tryChangeMovement()

pocketmine\player\Player::tryChangeMovement ( )
protected

Reimplemented from pocketmine\entity\Entity.

Definition at line 1407 of file Player.php.

◆ unloadChunk()

pocketmine\player\Player::unloadChunk ( int  $x,
int  $z,
?World  $world = null 
)
protected

Definition at line 753 of file Player.php.

◆ unsetBasePermission()

pocketmine\permission\Permissible::unsetBasePermission ( Permission|string  $name)
inherited

Unsets a baseline permission previously set. If it wasn't already set, this will have no effect. Note that this might have different results than setting the permission to false.

Implemented in pocketmine\permission\PermissibleInternal.

◆ updateFallState()

pocketmine\entity\Entity::updateFallState ( float  $distanceThisTick,
bool  $onGround 
)
protectedinherited

Definition at line 1075 of file Entity.php.

◆ updateMovement()

pocketmine\player\Player::updateMovement ( bool  $teleport = false)
protected

Reimplemented from pocketmine\entity\Entity.

Definition at line 1403 of file Player.php.

◆ useHeldItem()

pocketmine\player\Player::useHeldItem ( )

Activates the item in hand, for example throwing a projectile.

Returns
bool if it did something

Definition at line 1601 of file Player.php.

Member Data Documentation

◆ $absorptionAttr

Attribute pocketmine\entity\Living::$absorptionAttr
protectedinherited

Definition at line 120 of file Living.php.

◆ $allowFlight

bool pocketmine\player\Player::$allowFlight = false
protected

Definition at line 277 of file Player.php.

◆ $alwaysShowNameTag

bool pocketmine\entity\Entity::$alwaysShowNameTag = false
protectedinherited

Definition at line 168 of file Entity.php.

◆ $armorInventory

ArmorInventory pocketmine\entity\Living::$armorInventory
protectedinherited

Definition at line 113 of file Living.php.

◆ $attackTime

int pocketmine\entity\Living::$attackTime = 0
protectedinherited

Definition at line 104 of file Living.php.

◆ $attributeMap

AttributeMap pocketmine\entity\Entity::$attributeMap
protectedinherited

Definition at line 150 of file Entity.php.

◆ $authenticated

bool pocketmine\player\Player::$authenticated
protected

Definition at line 216 of file Player.php.

◆ $autoJump

bool pocketmine\player\Player::$autoJump = true
protected

Definition at line 276 of file Player.php.

◆ $blockBreakHandler

SurvivalBlockBreakHandler pocketmine\player\Player::$blockBreakHandler = null
protected

Definition at line 297 of file Player.php.

◆ $blockCollision

bool pocketmine\player\Player::$blockCollision = true
protected

Definition at line 278 of file Player.php.

◆ $blocksAround

array pocketmine\entity\Entity::$blocksAround = null
protectedinherited

Definition at line 115 of file Entity.php.

◆ $boundingBox

AxisAlignedBB pocketmine\entity\Entity::$boundingBox
inherited

Definition at line 124 of file Entity.php.

◆ $breathing

bool pocketmine\entity\Living::$breathing = true
protectedinherited

Definition at line 115 of file Living.php.

◆ $breathTicks

int pocketmine\entity\Living::$breathTicks = self::DEFAULT_BREATH_TICKS
protectedinherited

Definition at line 116 of file Living.php.

◆ $canClimb

bool pocketmine\entity\Entity::$canClimb = false
protectedinherited

Definition at line 172 of file Entity.php.

◆ $canClimbWalls

bool pocketmine\entity\Entity::$canClimbWalls = false
protectedinherited

Definition at line 173 of file Entity.php.

◆ $chunkLoader

ChunkLoader pocketmine\player\Player::$chunkLoader
protected

Definition at line 257 of file Player.php.

◆ $chunkSelector

ChunkSelector pocketmine\player\Player::$chunkSelector
protected

Definition at line 256 of file Player.php.

◆ $chunksPerTick

int pocketmine\player\Player::$chunksPerTick
protected

Definition at line 255 of file Player.php.

◆ $chunkTicker

ChunkTicker pocketmine\player\Player::$chunkTicker
protected

Definition at line 258 of file Player.php.

◆ $closed

bool pocketmine\entity\Entity::$closed = false
protectedinherited

Definition at line 158 of file Entity.php.

◆ $craftingGrid

PlayerCraftingInventory pocketmine\player\Player::$craftingGrid
protected

Definition at line 223 of file Player.php.

◆ $creativeInventory

CreativeInventory pocketmine\player\Player::$creativeInventory
protected

Definition at line 224 of file Player.php.

◆ $currentWindow

Inventory pocketmine\player\Player::$currentWindow = null
protected

Definition at line 219 of file Player.php.

◆ $cursorInventory

PlayerCursorInventory pocketmine\player\Player::$cursorInventory
protected

Definition at line 222 of file Player.php.

◆ $deadTicks

int pocketmine\entity\Living::$deadTicks = 0
inherited

Definition at line 106 of file Living.php.

◆ $displayName

string pocketmine\player\Player::$displayName
protected

Definition at line 214 of file Player.php.

◆ $drag

float pocketmine\entity\Entity::$drag
protectedinherited

Definition at line 153 of file Entity.php.

◆ $effectManager

EffectManager pocketmine\entity\Living::$effectManager
protectedinherited

Definition at line 111 of file Living.php.

◆ $enderInventory

PlayerEnderInventory pocketmine\entity\Human::$enderInventory
protectedinherited

Definition at line 105 of file Human.php.

◆ $fallDistance

float pocketmine\entity\Entity::$fallDistance = 0.0
inherited

Definition at line 136 of file Entity.php.

◆ $fireTicks

int pocketmine\entity\Entity::$fireTicks = 0
protectedinherited

Definition at line 139 of file Entity.php.

◆ $firstPlayed

int pocketmine\player\Player::$firstPlayed
protected

Definition at line 228 of file Player.php.

◆ $flying

bool pocketmine\player\Player::$flying = false
protected

Definition at line 279 of file Player.php.

◆ $forceMovementUpdate

bool pocketmine\entity\Entity::$forceMovementUpdate = false
protectedinherited

Definition at line 121 of file Entity.php.

◆ $formIdCounter

int pocketmine\player\Player::$formIdCounter = 0
protected

Definition at line 291 of file Player.php.

◆ $forms

array pocketmine\player\Player::$forms = []
protected

Definition at line 293 of file Player.php.

◆ $gamemode

GameMode pocketmine\player\Player::$gamemode
protected

Definition at line 230 of file Player.php.

◆ $gliding

bool pocketmine\entity\Living::$gliding = false
protectedinherited

Definition at line 126 of file Living.php.

◆ $gravity

float pocketmine\entity\Entity::$gravity
protectedinherited

Definition at line 152 of file Entity.php.

◆ $gravityEnabled

bool pocketmine\entity\Entity::$gravityEnabled = true
protectedinherited

Definition at line 154 of file Entity.php.

◆ $hasSpawned

array pocketmine\entity\Entity::$hasSpawned = []
protectedinherited

Definition at line 106 of file Entity.php.

◆ $healthAttr

Attribute pocketmine\entity\Living::$healthAttr
protectedinherited

Definition at line 119 of file Living.php.

◆ $hiddenPlayers

array pocketmine\player\Player::$hiddenPlayers = []
protected

Definition at line 261 of file Player.php.

◆ $hungerManager

HungerManager pocketmine\entity\Human::$hungerManager
protectedinherited

Definition at line 111 of file Human.php.

◆ $id

int pocketmine\entity\Entity::$id
protectedinherited

Definition at line 108 of file Entity.php.

◆ $inAirTicks

int pocketmine\player\Player::$inAirTicks = 0
protected

Definition at line 266 of file Player.php.

◆ $inventory

PlayerInventory pocketmine\entity\Human::$inventory
protectedinherited

Definition at line 103 of file Human.php.

◆ $invisible

bool pocketmine\entity\Entity::$invisible = false
protectedinherited

Definition at line 175 of file Entity.php.

◆ $isCollided

bool pocketmine\entity\Entity::$isCollided = false
inherited

Definition at line 143 of file Entity.php.

◆ $isCollidedHorizontally

bool pocketmine\entity\Entity::$isCollidedHorizontally = false
inherited

Definition at line 144 of file Entity.php.

◆ $isCollidedVertically

bool pocketmine\entity\Entity::$isCollidedVertically = false
inherited

Definition at line 145 of file Entity.php.

◆ $jumpVelocity

float pocketmine\entity\Living::$jumpVelocity = 0.42
protectedinherited

Definition at line 109 of file Living.php.

◆ $justCreated

bool pocketmine\entity\Entity::$justCreated = true
protectedinherited

Definition at line 148 of file Entity.php.

◆ $keepMovement

bool pocketmine\entity\Entity::$keepMovement = false
inherited

Definition at line 134 of file Entity.php.

◆ $knockbackResistanceAttr

Attribute pocketmine\entity\Living::$knockbackResistanceAttr
protectedinherited

Definition at line 121 of file Living.php.

◆ $lastDamageCause

EntityDamageEvent pocketmine\entity\Entity::$lastDamageCause = null
protectedinherited

Definition at line 112 of file Entity.php.

◆ $lastLocation

Location pocketmine\entity\Entity::$lastLocation
protectedinherited

Definition at line 118 of file Entity.php.

◆ $lastMotion

Vector3 pocketmine\entity\Entity::$lastMotion
protectedinherited

Definition at line 120 of file Entity.php.

◆ $lastMovementProcess

float pocketmine\player\Player::$lastMovementProcess = null
protected

Definition at line 264 of file Player.php.

◆ $lastPlayed

int pocketmine\player\Player::$lastPlayed
protected

Definition at line 229 of file Player.php.

◆ $lastUpdate

int pocketmine\entity\Entity::$lastUpdate
inherited

Definition at line 138 of file Entity.php.

◆ $lineHeight

int pocketmine\player\Player::$lineHeight = null
protected

@phpstan-var positive-int|null

Definition at line 282 of file Player.php.

◆ $loadQueue

array pocketmine\player\Player::$loadQueue = []
protected

Definition at line 246 of file Player.php.

◆ $locale

string pocketmine\player\Player::$locale = "en_US"
protected

Definition at line 283 of file Player.php.

◆ $location

Location pocketmine\entity\Entity::$location
protectedinherited

Definition at line 117 of file Entity.php.

◆ $logger

Logger pocketmine\player\Player::$logger
protected

Definition at line 295 of file Player.php.

◆ $maxBreathTicks

int pocketmine\entity\Living::$maxBreathTicks = self::DEFAULT_BREATH_TICKS
protectedinherited

Definition at line 117 of file Living.php.

◆ $maxDeadTicks

int pocketmine\entity\Living::$maxDeadTicks = 25
protectedinherited

Definition at line 107 of file Living.php.

◆ $messageCounter

int pocketmine\player\Player::$messageCounter = 2
protected

Definition at line 226 of file Player.php.

◆ $motion

Vector3 pocketmine\entity\Entity::$motion
protectedinherited

Definition at line 119 of file Entity.php.

◆ $moveRateLimit

float pocketmine\player\Player::$moveRateLimit = 10 * self::MOVES_PER_TICK
protected

Definition at line 263 of file Player.php.

◆ $moveSpeedAttr

Attribute pocketmine\entity\Living::$moveSpeedAttr
protectedinherited

Definition at line 122 of file Living.php.

◆ $nameTag

string pocketmine\entity\Entity::$nameTag = ""
protectedinherited

Definition at line 166 of file Entity.php.

◆ $nameTagVisible

bool pocketmine\entity\Entity::$nameTagVisible = true
protectedinherited

Definition at line 167 of file Entity.php.

◆ $networkPropertiesDirty

bool pocketmine\entity\Entity::$networkPropertiesDirty = false
protectedinherited

Definition at line 164 of file Entity.php.

◆ $networkSession

NetworkSession pocketmine\player\Player::$networkSession
protected

Definition at line 209 of file Player.php.

◆ $nextChunkOrderRun

int pocketmine\player\Player::$nextChunkOrderRun = 5
protected

Definition at line 247 of file Player.php.

◆ $noClientPredictions

bool pocketmine\entity\Entity::$noClientPredictions = false
protectedinherited

Definition at line 174 of file Entity.php.

◆ $noDamageTicks

int pocketmine\entity\Entity::$noDamageTicks = 0
inherited

Definition at line 147 of file Entity.php.

◆ $offHandInventory

PlayerOffHandInventory pocketmine\entity\Human::$offHandInventory
protectedinherited

Definition at line 104 of file Human.php.

◆ $onGround

bool pocketmine\entity\Entity::$onGround = false
inherited

Definition at line 125 of file Entity.php.

◆ $ownerId

int pocketmine\entity\Entity::$ownerId = null
protectedinherited

Definition at line 178 of file Entity.php.

◆ $permanentWindows

array pocketmine\player\Player::$permanentWindows = []
protected

Definition at line 221 of file Player.php.

◆ $playerInfo

PlayerInfo pocketmine\player\Player::$playerInfo
protected

Definition at line 217 of file Player.php.

◆ $scale

float pocketmine\entity\Entity::$scale = 1.0
protectedinherited

Definition at line 170 of file Entity.php.

◆ $scoreTag

string pocketmine\entity\Entity::$scoreTag = ""
protectedinherited

Definition at line 169 of file Entity.php.

◆ $server

Server pocketmine\entity\Entity::$server
protectedinherited

Definition at line 156 of file Entity.php.

◆ $silent

bool pocketmine\entity\Entity::$silent = false
protectedinherited

Definition at line 176 of file Entity.php.

◆ $size

EntitySizeInfo pocketmine\entity\Entity::$size
inherited

Definition at line 127 of file Entity.php.

◆ $skin

Skin pocketmine\entity\Human::$skin
protectedinherited

Definition at line 109 of file Human.php.

◆ $sleeping

Vector3 pocketmine\player\Player::$sleeping = null
protected

Definition at line 270 of file Player.php.

◆ $sneaking

bool pocketmine\entity\Living::$sneaking = false
protectedinherited

Definition at line 125 of file Living.php.

◆ $spawnChunkLoadCount

int pocketmine\player\Player::$spawnChunkLoadCount = 0
protected

Definition at line 254 of file Player.php.

◆ $spawned

bool pocketmine\player\Player::$spawned = false

Definition at line 211 of file Player.php.

◆ $spawnThreshold

int pocketmine\player\Player::$spawnThreshold
protected

Definition at line 253 of file Player.php.

◆ $sprinting

bool pocketmine\entity\Living::$sprinting = false
protectedinherited

Definition at line 124 of file Living.php.

◆ $startAction

int pocketmine\player\Player::$startAction = -1
protected

Definition at line 285 of file Player.php.

◆ $stepHeight

float pocketmine\player\Player::$stepHeight = 0.6
protected

Definition at line 268 of file Player.php.

◆ $swimming

bool pocketmine\entity\Living::$swimming = false
protectedinherited

Definition at line 127 of file Living.php.

◆ $targetId

int pocketmine\entity\Entity::$targetId = null
protectedinherited

Definition at line 179 of file Entity.php.

◆ $ticksLived

int pocketmine\entity\Entity::$ticksLived = 0
inherited

Definition at line 137 of file Entity.php.

◆ $timings

TimingsHandler pocketmine\entity\Entity::$timings
protectedinherited

Definition at line 162 of file Entity.php.

◆ $usedChunks

array pocketmine\player\Player::$usedChunks = []
protected

Definition at line 236 of file Player.php.

◆ $usedItemsCooldown

array pocketmine\player\Player::$usedItemsCooldown = []
protected

Definition at line 287 of file Player.php.

◆ $username

string pocketmine\player\Player::$username
protected

Definition at line 213 of file Player.php.

◆ $uuid

UuidInterface pocketmine\entity\Human::$uuid
protectedinherited

Definition at line 107 of file Human.php.

◆ $viewDistance

int pocketmine\player\Player::$viewDistance = -1
protected

Definition at line 252 of file Player.php.

◆ $xpManager

ExperienceManager pocketmine\entity\Human::$xpManager
protectedinherited

Definition at line 112 of file Human.php.

◆ $xpSeed

int pocketmine\entity\Human::$xpSeed
protectedinherited

Definition at line 114 of file Human.php.

◆ $xuid

string pocketmine\player\Player::$xuid = ""
protected

Definition at line 215 of file Player.php.

◆ $ySize

float pocketmine\entity\Entity::$ySize = 0.0
protectedinherited

Definition at line 132 of file Entity.php.

◆ DEFAULT_BREATH_TICKS

const pocketmine\entity\Living::DEFAULT_BREATH_TICKS = 300
protectedinherited

Definition at line 81 of file Living.php.

◆ DEFAULT_KNOCKBACK_FORCE

const pocketmine\entity\Living::DEFAULT_KNOCKBACK_FORCE = 0.4
inherited

The default knockback multiplier when an entity is hit by another entity. Larger values knock the entity back with increased velocity.

Definition at line 87 of file Living.php.

◆ DEFAULT_KNOCKBACK_VERTICAL_LIMIT

const pocketmine\entity\Living::DEFAULT_KNOCKBACK_VERTICAL_LIMIT = 0.4
inherited

Limit of an entity's vertical knockback velocity when hit by another entity. Without this limit, the entity may be knocked far up into the air with large knockback forces.

Definition at line 92 of file Living.php.

◆ MOTION_THRESHOLD

const pocketmine\entity\Entity::MOTION_THRESHOLD = 0.00001
inherited

Definition at line 84 of file Entity.php.

◆ STEP_CLIP_MULTIPLIER

const pocketmine\entity\Entity::STEP_CLIP_MULTIPLIER = 0.4
protectedinherited

Definition at line 85 of file Entity.php.

◆ TAG_FIRST_PLAYED

const pocketmine\player\Player::TAG_FIRST_PLAYED = "firstPlayed"

Definition at line 186 of file Player.php.

◆ TAG_LAST_KNOWN_XUID

const pocketmine\player\Player::TAG_LAST_KNOWN_XUID = "LastKnownXUID"

Definition at line 194 of file Player.php.

◆ TAG_LAST_PLAYED

const pocketmine\player\Player::TAG_LAST_PLAYED = "lastPlayed"

Definition at line 187 of file Player.php.

◆ TAG_LEVEL

const pocketmine\player\Player::TAG_LEVEL = "Level"

Definition at line 193 of file Player.php.

◆ TAG_MOTION

const pocketmine\entity\Entity::TAG_MOTION = "Motion"
inherited

Definition at line 93 of file Entity.php.

◆ TAG_POS

const pocketmine\entity\Entity::TAG_POS = "Pos"
inherited

Definition at line 92 of file Entity.php.

◆ TAG_ROTATION

const pocketmine\entity\Entity::TAG_ROTATION = "Rotation"
inherited

Definition at line 94 of file Entity.php.


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