Human
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 $xpSeedMethods
__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) : voidapplyDamageModifiers()
php
public function applyDamageModifiers(\pocketmine\event\entity\EntityDamageEvent $source) : voidapplyPostDamageEffects() protected
php
protected function applyPostDamageEffects(\pocketmine\event\entity\EntityDamageEvent $source) : voidcanEat()
php
public function canEat() : boolReturns 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) : booldestroyCycles() protected
php
protected function destroyCycles() : voidemote()
php
public function emote(string $emoteId) : voidentityBaseTick() protected
php
protected function entityBaseTick(int $tickDiff = 1) : boolgetDrops()
php
public function getDrops() : arraygetEnchantmentSeed()
php
public function getEnchantmentSeed() : intgetEnderInventory()
php
public function getEnderInventory() : \pocketmine\inventory\PlayerEnderInventorygetHungerManager()
php
public function getHungerManager() : \pocketmine\entity\HungerManagergetInitialSizeInfo() protected
php
protected function getInitialSizeInfo() : \pocketmine\entity\EntitySizeInfogetInventory()
php
public function getInventory() : \pocketmine\inventory\PlayerInventorygetName()
php
public function getName() : stringgetNetworkTypeId()
php
public static function getNetworkTypeId() : stringgetOffHandInventory()
php
public function getOffHandInventory() : \pocketmine\inventory\PlayerOffHandInventorygetOffsetPosition()
php
public function getOffsetPosition(\pocketmine\math\Vector3 $vector3) : \pocketmine\math\Vector3getSeatedHeightOffset() 5.46.0
php
public function getSeatedHeightOffset() : floatgetSkin()
php
public function getSkin() : \pocketmine\entity\SkinReturns a Skin object containing information about this human's skin.
getSneakOffset()
php
public function getSneakOffset() : floatgetUniqueId()
php
public function getUniqueId() : \Ramsey\Uuid\UuidInterfacegetXpDropAmount()
php
public function getXpDropAmount() : intgetXpManager()
php
public function getXpManager() : \pocketmine\entity\ExperienceManagerinitEntity() protected
php
protected function initEntity(\pocketmine\nbt\tag\CompoundTag $nbt) : voidinitHumanData() protected
php
protected function initHumanData(\pocketmine\nbt\tag\CompoundTag $nbt) : voidFor Human entities which are not players, sets their properties such as nametag, skin and UUID from NBT.
jump()
php
public function jump() : voidonDispose() protected
php
protected function onDispose() : voidparseSkinNBT()
php
public static function parseSkinNBT(\pocketmine\nbt\tag\CompoundTag $nbt) : \pocketmine\entity\SkinregenerateEnchantmentSeed()
php
public function regenerateEnchantmentSeed() : voidsaveNBT()
php
public function saveNBT() : \pocketmine\nbt\tag\CompoundTagsendSkin()
php
public function sendSkin(?array $targets = null) : voidSends 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) : voidsetEnchantmentSeed()
php
public function setEnchantmentSeed(int $seed) : voidsetSkin()
php
public function setSkin(\pocketmine\entity\Skin $skin) : voidSets 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