mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 01:09:44 +00:00
Remove nasty network crap from API
This commit is contained in:
parent
a944641509
commit
97c836f199
@ -34,22 +34,12 @@ use pocketmine\entity\Vehicle;
|
||||
* Called when a entity is despawned
|
||||
*/
|
||||
class EntityDespawnEvent extends EntityEvent{
|
||||
/** @var int */
|
||||
private $entityType;
|
||||
|
||||
/**
|
||||
* @param Entity $entity
|
||||
*/
|
||||
public function __construct(Entity $entity){
|
||||
$this->entity = $entity;
|
||||
$this->entityType = $entity::NETWORK_ID;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getType() : int{
|
||||
return $this->entityType;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -35,15 +35,12 @@ use pocketmine\level\Position;
|
||||
* Called when a entity is spawned
|
||||
*/
|
||||
class EntitySpawnEvent extends EntityEvent{
|
||||
/** @var int */
|
||||
private $entityType;
|
||||
|
||||
/**
|
||||
* @param Entity $entity
|
||||
*/
|
||||
public function __construct(Entity $entity){
|
||||
$this->entity = $entity;
|
||||
$this->entityType = $entity::NETWORK_ID;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -53,13 +50,6 @@ class EntitySpawnEvent extends EntityEvent{
|
||||
return $this->entity->getPosition();
|
||||
}
|
||||
|
||||
/**
|
||||
* @return int
|
||||
*/
|
||||
public function getType() : int{
|
||||
return $this->entityType;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return bool
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user