mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 19:02:59 +00:00
Hinting up Entity API to PHP 7.2 standards
This commit is contained in:
@ -47,13 +47,13 @@ class PrimedTNT extends Entity implements Explosive{
|
||||
public $canCollide = false;
|
||||
|
||||
|
||||
public function attack(EntityDamageEvent $source){
|
||||
public function attack(EntityDamageEvent $source) : void{
|
||||
if($source->getCause() === EntityDamageEvent::CAUSE_VOID){
|
||||
parent::attack($source);
|
||||
}
|
||||
}
|
||||
|
||||
protected function initEntity(){
|
||||
protected function initEntity() : void{
|
||||
parent::initEntity();
|
||||
|
||||
if($this->namedtag->hasTag("Fuse", ShortTag::class)){
|
||||
@ -73,7 +73,7 @@ class PrimedTNT extends Entity implements Explosive{
|
||||
return false;
|
||||
}
|
||||
|
||||
public function saveNBT(){
|
||||
public function saveNBT() : void{
|
||||
parent::saveNBT();
|
||||
$this->namedtag->setShort("Fuse", $this->fuse, true); //older versions incorrectly saved this as a byte
|
||||
}
|
||||
@ -101,7 +101,7 @@ class PrimedTNT extends Entity implements Explosive{
|
||||
return $hasUpdate or $this->fuse >= 0;
|
||||
}
|
||||
|
||||
public function explode(){
|
||||
public function explode() : void{
|
||||
$this->server->getPluginManager()->callEvent($ev = new ExplosionPrimeEvent($this, 4));
|
||||
|
||||
if(!$ev->isCancelled()){
|
||||
|
Reference in New Issue
Block a user