PocketMine
Attribute Class Reference

Public Member Functions

 getMinValue ()
 
 setMinValue ($minValue)
 
 getMaxValue ()
 
 setMaxValue ($maxValue)
 
 getDefaultValue ()
 
 setDefaultValue ($defaultValue)
 
 getValue ()
 
 setValue ($value)
 
 getName ()
 
 getId ()
 
 isSyncable ()
 

Static Public Member Functions

static init ()
 
static addAttribute ($id, $name, $minValue, $maxValue, $defaultValue, $shouldSend=false)
 
static getAttribute ($id)
 
static getAttributeByName ($name)
 

Data Fields

const MAX_HEALTH = 0
 
const EXPERIENCE = 1
 
const EXPERIENCE_LEVEL = 2
 

Protected Attributes

 $minValue
 
 $maxValue
 
 $defaultValue
 
 $currentValue
 
 $name
 
 $shouldSend
 

Static Protected Attributes

static $attributes = []
 

Member Function Documentation

static addAttribute (   $id,
  $name,
  $minValue,
  $maxValue,
  $defaultValue,
  $shouldSend = false 
)
static
Parameters
int$id
string$name
float$minValue
float$maxValue
float$defaultValue
bool$shouldSend
Returns
Attribute
static getAttribute (   $id)
static
Parameters
$id
Returns
null|Attribute
static getAttributeByName (   $name)
static
Parameters
$name
Returns
null|Attribute

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