GenisysPro  for Minecraft PE/Windows 10 v1.1.x
Feature-rich server software for Minecraft PE and Windows 10 Edition
EntityCombustEvent Class Reference

Public Member Functions

 __construct (Entity $combustee, $duration, $ProtectLevel=0)
 
 getDuration ()
 
 setDuration ($duration)
 
 setProtectLevel ($ProtectLevel)
 
- Public Member Functions inherited from EntityEvent
 getEntity ()
 
- Public Member Functions inherited from Event
 getEventName ()
 
 getHandlers ()
 
- Public Member Functions inherited from Cancellable
 isCancelled ()
 
 setCancelled ($forceCancel=false)
 

Static Public Attributes

static $handlerList = null
 

Protected Attributes

 $duration
 
 $ProtectLevel
 
- Protected Attributes inherited from EntityEvent
 $entity
 
- Protected Attributes inherited from Event
 $eventName = null
 

Constructor & Destructor Documentation

◆ __construct()

__construct ( Entity  $combustee,
  $duration,
  $ProtectLevel = 0 
)
Parameters
Entity$combustee
int$duration
int$ProtectLevel
38  {
39  $this->entity = $combustee;
40  $this->duration = $duration;
41  $this->ProtectLevel = $ProtectLevel;
42  }

Member Function Documentation

◆ getDuration()

getDuration ( )
Returns
float|int
47  {
48  if($this->ProtectLevel !== 0){
49  return round($this->duration * (1 - 0.15 * $this->ProtectLevel));
50  }else{
51  return $this->duration;
52  }
53  }

◆ setDuration()

setDuration (   $duration)
Parameters
$duration
58  {
59  $this->duration = (int) $duration;
60  }

◆ setProtectLevel()

setProtectLevel (   $ProtectLevel)
Parameters
$ProtectLevel
65  {
66  $this->ProtectLevel = (int) $ProtectLevel;
67  }

Field Documentation

◆ $duration

$duration
protected

◆ $handlerList

$handlerList = null
static

◆ $ProtectLevel

$ProtectLevel
protected

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