mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Typehinted up entity API
Did you guys think ALPHA7 changes were done?! Sone stuff still needs some work, most notably data-properties can't be typed yet because they are just mushed into a couple of methods.
This commit is contained in:
@ -65,7 +65,7 @@ abstract class Projectile extends Entity{
|
||||
}
|
||||
}
|
||||
|
||||
public function canCollideWith(Entity $entity){
|
||||
public function canCollideWith(Entity $entity) : bool{
|
||||
return $entity instanceof Living and !$this->onGround;
|
||||
}
|
||||
|
||||
@ -108,7 +108,7 @@ abstract class Projectile extends Entity{
|
||||
$this->namedtag->Age = new ShortTag("Age", $this->age);
|
||||
}
|
||||
|
||||
public function onUpdate($currentTick){
|
||||
public function onUpdate(int $currentTick) : bool{
|
||||
if($this->closed){
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user