Skip to content

Human ​

class · pocketmine\entity\Human · source

Extends Living
Implements ProjectileSource, InventoryHolder

Properties ​

$enderInventory protected ​

php
protected \pocketmine\inventory\PlayerEnderInventory $enderInventory

$hungerManager protected ​

php
protected \pocketmine\entity\HungerManager $hungerManager

$inventory protected ​

php
protected \pocketmine\inventory\PlayerInventory $inventory

$offHandInventory protected ​

php
protected \pocketmine\inventory\PlayerOffHandInventory $offHandInventory

$skin protected ​

php
protected \pocketmine\entity\Skin $skin

$uuid protected ​

php
protected \Ramsey\Uuid\UuidInterface $uuid

$xpManager protected ​

php
protected \pocketmine\entity\ExperienceManager $xpManager

$xpSeed protected ​

php
protected int $xpSeed

Methods ​

__construct() ​

php
public function __construct(\pocketmine\entity\Location $location, \pocketmine\entity\Skin $skin, ?\pocketmine\nbt\tag\CompoundTag $nbt = null)

applyConsumptionResults() protected ​

php
protected function applyConsumptionResults(\pocketmine\entity\Consumable $consumable) : void

applyDamageModifiers() ​

php
public function applyDamageModifiers(\pocketmine\event\entity\EntityDamageEvent $source) : void

applyPostDamageEffects() protected ​

php
protected function applyPostDamageEffects(\pocketmine\event\entity\EntityDamageEvent $source) : void

canEat() ​

php
public function canEat() : bool

Returns whether the Human can eat food. This may return a different result than HungerManager::isHungry(), as HungerManager only handles the hunger bar.

consumeObject() ​

php
public function consumeObject(\pocketmine\entity\Consumable $consumable) : bool

destroyCycles() protected ​

php
protected function destroyCycles() : void

emote() ​

php
public function emote(string $emoteId) : void

entityBaseTick() protected ​

php
protected function entityBaseTick(int $tickDiff = 1) : bool

getDrops() ​

php
public function getDrops() : array

getEnchantmentSeed() ​

php
public function getEnchantmentSeed() : int

getEnderInventory() ​

php
public function getEnderInventory() : \pocketmine\inventory\PlayerEnderInventory

getHungerManager() ​

php
public function getHungerManager() : \pocketmine\entity\HungerManager

getInitialSizeInfo() protected ​

php
protected function getInitialSizeInfo() : \pocketmine\entity\EntitySizeInfo

getInventory() ​

php
public function getInventory() : \pocketmine\inventory\PlayerInventory

getName() ​

php
public function getName() : string

getNetworkTypeId() ​

php
public static function getNetworkTypeId() : string

getOffHandInventory() ​

php
public function getOffHandInventory() : \pocketmine\inventory\PlayerOffHandInventory

getOffsetPosition() ​

php
public function getOffsetPosition(\pocketmine\math\Vector3 $vector3) : \pocketmine\math\Vector3

getSeatedHeightOffset() 5.46.0 ​

php
public function getSeatedHeightOffset() : float

getSkin() ​

php
public function getSkin() : \pocketmine\entity\Skin

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

getSneakOffset() ​

php
public function getSneakOffset() : float

getUniqueId() ​

php
public function getUniqueId() : \Ramsey\Uuid\UuidInterface

getXpDropAmount() ​

php
public function getXpDropAmount() : int

getXpManager() ​

php
public function getXpManager() : \pocketmine\entity\ExperienceManager

initEntity() protected ​

php
protected function initEntity(\pocketmine\nbt\tag\CompoundTag $nbt) : void

initHumanData() protected ​

php
protected function initHumanData(\pocketmine\nbt\tag\CompoundTag $nbt) : void

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

jump() ​

php
public function jump() : void

onDispose() protected ​

php
protected function onDispose() : void

parseSkinNBT() ​

php
public static function parseSkinNBT(\pocketmine\nbt\tag\CompoundTag $nbt) : \pocketmine\entity\Skin

regenerateEnchantmentSeed() ​

php
public function regenerateEnchantmentSeed() : void

saveNBT() ​

php
public function saveNBT() : \pocketmine\nbt\tag\CompoundTag

sendSkin() ​

php
public function sendSkin(?array $targets = null) : void

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.

sendSpawnPacket() protected ​

php
protected function sendSpawnPacket(\pocketmine\player\Player $player) : void

setEnchantmentSeed() ​

php
public function setEnchantmentSeed(int $seed) : void

setSkin() ​

php
public function setSkin(\pocketmine\entity\Skin $skin) : void

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

spawnTo() ​

php
public function spawnTo(\pocketmine\player\Player $player) : void

VanillaMine is a fork of PocketMine-MP, maintained by Luxury Nodes. Not affiliated with the PMMP team or Mojang.