Typehinted up Entity API and some cleanup

This commit is contained in:
Dylan K. Taylor
2017-08-30 12:17:56 +01:00
parent fd52022065
commit adc6b03d4c
23 changed files with 146 additions and 98 deletions

View File

@ -51,7 +51,7 @@ class EntityExplodeEvent extends EntityEvent implements Cancellable{
* @param Block[] $blocks
* @param float $yield
*/
public function __construct(Entity $entity, Position $position, array $blocks, $yield){
public function __construct(Entity $entity, Position $position, array $blocks, float $yield){
$this->entity = $entity;
$this->position = $position;
$this->blocks = $blocks;
@ -61,14 +61,14 @@ class EntityExplodeEvent extends EntityEvent implements Cancellable{
/**
* @return Position
*/
public function getPosition(){
public function getPosition() : Position{
return $this->position;
}
/**
* @return Block[]
*/
public function getBlockList(){
public function getBlockList() : array{
return $this->blocks;
}
@ -82,14 +82,14 @@ class EntityExplodeEvent extends EntityEvent implements Cancellable{
/**
* @return float
*/
public function getYield(){
public function getYield() : float{
return $this->yield;
}
/**
* @param float $yield
*/
public function setYield($yield){
public function setYield(float $yield){
$this->yield = $yield;
}