mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-07 18:32:55 +00:00
Typehinted up Entity API and some cleanup
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user