PHP Class pocketmine\entity\Human

Inheritance: extends Creature, implements ProjectileSource, implements pocketmine\inventory\InventoryHolder
Afficher le fichier Open project: iTXTech/Genisys Class Usage Examples

Méthodes publiques

Свойство Type Description
$eyeHeight
$height
$length
$width

Protected Properties

Свойство Type Description
$floatingInventory pocketmine\inventory\FloatingInventory
$foodTickTimer
$inventory pocketmine\inventory\PlayerInventory
$rawUUID
$skin
$skinId
$totalXp
$transactionQueue pocketmine\inventory\SimpleTransactionQueue
$uuid pocketmine\utils\UUID
$xpCooldown
$xpSeed

Méthodes publiques

Méthode Description
addFood ( float $amount )
addSaturation ( float $amount )
addXp ( integer $xp, boolean $syncLevel = false ) : boolean
addXpLevel ( integer $level ) : boolean
canPickupXp ( ) : boolean
close ( )
despawnFrom ( Player $player )
entityBaseTick ( $tickDiff = 1, $EnchantL )
exhaust ( float $amount, integer $cause = PlayerExhaustEvent::CAUSE_CUSTOM ) : float Increases a human's exhaustion level.
getAbsorption ( ) : integer
getDrops ( )
getExhaustion ( ) : float
getFilledXp ( ) : integer
getFloatingInventory ( )
getFood ( ) : float
getInventory ( )
getLevelFromXp ( integer $xp ) : array Converts a quantity of exp into a level and a progress percentage
getLevelXpRequirement ( integer $level ) : integer Returns the amount of exp required to complete the specified level.
getMaxFood ( ) : float
getName ( )
getRawUniqueId ( ) : string
getRemainderXp ( ) : integer
getSaturation ( ) : float
getSkinData ( )
getSkinId ( )
getTotalXp ( ) : integer
getTotalXpRequirement ( integer $level ) : integer Returns the total amount of exp required to reach the specified level.
getTransactionQueue ( )
getUniqueId ( ) : UUID | null
getXpLevel ( ) : integer
getXpProgress ( ) : float
getXpSeed ( ) : integer
recalculateXpProgress ( ) : float
resetXpCooldown ( )
saveNBT ( )
setAbsorption ( integer $absorption )
setExhaustion ( float $exhaustion ) WARNING: This method does not check if exhausted and does not consume saturation/food.
setFood ( float $new ) WARNING: This method does not check if full and may throw an exception if out of bounds.
setSaturation ( float $saturation ) WARNING: This method does not check if saturated and may throw an exception if out of bounds.
setSkin ( string $str, string $skinId )
setTotalXp ( integer $xp, boolean $syncLevel = false ) : boolean Changes the total exp of a player
setXpLevel ( integer $level ) : boolean
setXpProgress ( float $progress ) : boolean
spawnTo ( Player $player )
takeXp ( integer $xp, boolean $syncLevel = false ) : boolean
takeXpLevel ( integer $level ) : boolean

Méthodes protégées

Méthode Description
addAttributes ( )
initEntity ( )

Method Details

addAttributes() protected méthode

protected addAttributes ( )

addFood() public méthode

public addFood ( float $amount )
$amount float

addSaturation() public méthode

public addSaturation ( float $amount )
$amount float

addXp() public méthode

public addXp ( integer $xp, boolean $syncLevel = false ) : boolean
$xp integer
$syncLevel boolean
Résultat boolean

addXpLevel() public méthode

public addXpLevel ( integer $level ) : boolean
$level integer
Résultat boolean

canPickupXp() public méthode

public canPickupXp ( ) : boolean
Résultat boolean

close() public méthode

public close ( )

despawnFrom() public méthode

public despawnFrom ( Player $player )
$player pocketmine\Player

entityBaseTick() public méthode

public entityBaseTick ( $tickDiff = 1, $EnchantL )

exhaust() public méthode

Increases a human's exhaustion level.
public exhaust ( float $amount, integer $cause = PlayerExhaustEvent::CAUSE_CUSTOM ) : float
$amount float
$cause integer
Résultat float the amount of exhaustion level increased

getAbsorption() public méthode

public getAbsorption ( ) : integer
Résultat integer

getDrops() public méthode

public getDrops ( )

getExhaustion() public méthode

public getExhaustion ( ) : float
Résultat float

getFilledXp() public méthode

public getFilledXp ( ) : integer
Résultat integer

getFloatingInventory() public méthode

getFood() public méthode

public getFood ( ) : float
Résultat float

getInventory() public méthode

public getInventory ( )

getLevelFromXp() public static méthode

Converts a quantity of exp into a level and a progress percentage
public static getLevelFromXp ( integer $xp ) : array
$xp integer
Résultat array

getLevelXpRequirement() public static méthode

Returns the amount of exp required to complete the specified level.
public static getLevelXpRequirement ( integer $level ) : integer
$level integer
Résultat integer

getMaxFood() public méthode

public getMaxFood ( ) : float
Résultat float

getName() public méthode

public getName ( )

getRawUniqueId() public méthode

public getRawUniqueId ( ) : string
Résultat string

getRemainderXp() public méthode

public getRemainderXp ( ) : integer
Résultat integer

getSaturation() public méthode

public getSaturation ( ) : float
Résultat float

getSkinData() public méthode

public getSkinData ( )

getSkinId() public méthode

public getSkinId ( )

getTotalXp() public méthode

public getTotalXp ( ) : integer
Résultat integer

getTotalXpRequirement() public static méthode

Returns the total amount of exp required to reach the specified level.
public static getTotalXpRequirement ( integer $level ) : integer
$level integer
Résultat integer

getTransactionQueue() public méthode

public getTransactionQueue ( )

getUniqueId() public méthode

public getUniqueId ( ) : UUID | null
Résultat pocketmine\utils\UUID | null

getXpLevel() public méthode

public getXpLevel ( ) : integer
Résultat integer

getXpProgress() public méthode

public getXpProgress ( ) : float
Résultat float

getXpSeed() public méthode

public getXpSeed ( ) : integer
Résultat integer

initEntity() protected méthode

protected initEntity ( )

recalculateXpProgress() public méthode

public recalculateXpProgress ( ) : float
Résultat float

resetXpCooldown() public méthode

public resetXpCooldown ( )

saveNBT() public méthode

public saveNBT ( )

setAbsorption() public méthode

public setAbsorption ( integer $absorption )
$absorption integer

setExhaustion() public méthode

Use {@link Human::exhaust()} for this purpose.
public setExhaustion ( float $exhaustion )
$exhaustion float

setFood() public méthode

Use {@link Human::addFood()} for this purpose
public setFood ( float $new )
$new float

setSaturation() public méthode

Use {@link Human::addSaturation()} for this purpose
public setSaturation ( float $saturation )
$saturation float

setSkin() public méthode

public setSkin ( string $str, string $skinId )
$str string
$skinId string

setTotalXp() public méthode

Changes the total exp of a player
public setTotalXp ( integer $xp, boolean $syncLevel = false ) : boolean
$xp integer
$syncLevel boolean This will reset the level to be in sync with the total. Usually you don't want to do this, because it'll mess up use of xp in anvils and enchanting tables.
Résultat boolean

setXpLevel() public méthode

public setXpLevel ( integer $level ) : boolean
$level integer
Résultat boolean

setXpProgress() public méthode

public setXpProgress ( float $progress ) : boolean
$progress float
Résultat boolean

spawnTo() public méthode

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

takeXp() public méthode

public takeXp ( integer $xp, boolean $syncLevel = false ) : boolean
$xp integer
$syncLevel boolean
Résultat boolean

takeXpLevel() public méthode

public takeXpLevel ( integer $level ) : boolean
$level integer
Résultat boolean

Property Details

$eyeHeight public_oe property

public $eyeHeight

$floatingInventory protected_oe property

protected FloatingInventory,pocketmine\inventory $floatingInventory
Résultat pocketmine\inventory\FloatingInventory

$foodTickTimer protected_oe property

protected $foodTickTimer

$height public_oe property

public $height

$inventory protected_oe property

protected PlayerInventory,pocketmine\inventory $inventory
Résultat pocketmine\inventory\PlayerInventory

$length public_oe property

public $length

$rawUUID protected_oe property

protected $rawUUID

$skin protected_oe property

protected $skin

$skinId protected_oe property

protected $skinId

$totalXp protected_oe property

protected $totalXp

$transactionQueue protected_oe property

protected SimpleTransactionQueue,pocketmine\inventory $transactionQueue
Résultat pocketmine\inventory\SimpleTransactionQueue

$uuid protected_oe property

protected UUID,pocketmine\utils $uuid
Résultat pocketmine\utils\UUID

$width public_oe property

public $width

$xpCooldown protected_oe property

protected $xpCooldown

$xpSeed protected_oe property

protected $xpSeed