mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 10:53:05 +00:00
Refactored Server::broadcastPacket() to be non-static
Why the hell was this static at all? Seriously Shoghi?
This commit is contained in:
@ -74,7 +74,7 @@ abstract class Living extends Entity implements Damageable{
|
||||
$pk = new EntityEventPacket();
|
||||
$pk->eid = $this->getId();
|
||||
$pk->event = EntityEventPacket::RESPAWN;
|
||||
Server::broadcastPacket($this->hasSpawned, $pk);
|
||||
$this->server->broadcastPacket($this->hasSpawned, $pk);
|
||||
}
|
||||
}
|
||||
|
||||
@ -136,7 +136,7 @@ abstract class Living extends Entity implements Damageable{
|
||||
$pk = new EntityEventPacket();
|
||||
$pk->eid = $this->getId();
|
||||
$pk->event = $this->getHealth() <= 0 ? EntityEventPacket::DEATH_ANIMATION : EntityEventPacket::HURT_ANIMATION; //Ouch!
|
||||
Server::broadcastPacket($this->hasSpawned, $pk);
|
||||
$this->server->broadcastPacket($this->hasSpawned, $pk);
|
||||
|
||||
$this->attackTime = 10; //0.5 seconds cooldown
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ class Squid extends WaterAnimal implements Ageable{
|
||||
$pk = new EntityEventPacket();
|
||||
$pk->eid = $this->getId();
|
||||
$pk->event = EntityEventPacket::SQUID_INK_CLOUD;
|
||||
Server::broadcastPacket($this->hasSpawned, $pk);
|
||||
$this->server->broadcastPacket($this->hasSpawned, $pk);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user