PHP Class pocketmine\entity\Attribute

Exibir arquivo Open project: iTXTech/Genisys Class Usage Examples

Protected Properties

Property Type Description
$attributes Attribute[]
$currentValue
$defaultValue
$desynchronized
$maxValue
$minValue
$name
$shouldSend

Public Methods

Method Description
addAttribute ( integer $id, string $name, float $minValue, float $maxValue, float $defaultValue, boolean $shouldSend = true ) : Attribute
getAttribute ( $id ) : null | Attribute
getAttributeByName ( $name ) : null | Attribute
getDefaultValue ( )
getId ( )
getMaxValue ( )
getMinValue ( )
getName ( )
getValue ( )
init ( )
isDesynchronized ( ) : boolean
isSyncable ( )
markSynchronized ( boolean $synced = true )
setDefaultValue ( $defaultValue )
setMaxValue ( $maxValue )
setMinValue ( $minValue )
setValue ( $value, boolean $fit = true, boolean $shouldSend = false )

Private Methods

Method Description
__construct ( $id, $name, $minValue, $maxValue, $defaultValue, $shouldSend = true )

Method Details

addAttribute() public static method

public static addAttribute ( integer $id, string $name, float $minValue, float $maxValue, float $defaultValue, boolean $shouldSend = true ) : Attribute
$id integer
$name string
$minValue float
$maxValue float
$defaultValue float
$shouldSend boolean
return Attribute

getAttribute() public static method

public static getAttribute ( $id ) : null | Attribute
$id
return null | Attribute

getAttributeByName() public static method

public static getAttributeByName ( $name ) : null | Attribute
$name
return null | Attribute

getDefaultValue() public method

public getDefaultValue ( )

getId() public method

public getId ( )

getMaxValue() public method

public getMaxValue ( )

getMinValue() public method

public getMinValue ( )

getName() public method

public getName ( )

getValue() public method

public getValue ( )

init() public static method

public static init ( )

isDesynchronized() public method

public isDesynchronized ( ) : boolean
return boolean

isSyncable() public method

public isSyncable ( )

markSynchronized() public method

public markSynchronized ( boolean $synced = true )
$synced boolean

setDefaultValue() public method

public setDefaultValue ( $defaultValue )

setMaxValue() public method

public setMaxValue ( $maxValue )

setMinValue() public method

public setMinValue ( $minValue )

setValue() public method

public setValue ( $value, boolean $fit = true, boolean $shouldSend = false )
$fit boolean
$shouldSend boolean

Property Details

$attributes protected_oe static_oe property

protected static Attribute[],pocketmine\entity $attributes
return Attribute[]

$currentValue protected_oe property

protected $currentValue

$defaultValue protected_oe property

protected $defaultValue

$desynchronized protected_oe property

protected $desynchronized

$maxValue protected_oe property

protected $maxValue

$minValue protected_oe property

protected $minValue

$name protected_oe property

protected $name

$shouldSend protected_oe property

protected $shouldSend