Remove nasty network crap from API

This commit is contained in:
Dylan K. Taylor 2018-10-12 16:31:17 +01:00
parent a944641509
commit 97c836f199
2 changed files with 0 additions and 20 deletions

View File

@ -34,22 +34,12 @@ use pocketmine\entity\Vehicle;
* Called when a entity is despawned * Called when a entity is despawned
*/ */
class EntityDespawnEvent extends EntityEvent{ class EntityDespawnEvent extends EntityEvent{
/** @var int */
private $entityType;
/** /**
* @param Entity $entity * @param Entity $entity
*/ */
public function __construct(Entity $entity){ public function __construct(Entity $entity){
$this->entity = $entity; $this->entity = $entity;
$this->entityType = $entity::NETWORK_ID;
}
/**
* @return int
*/
public function getType() : int{
return $this->entityType;
} }
/** /**

View File

@ -35,15 +35,12 @@ use pocketmine\level\Position;
* Called when a entity is spawned * Called when a entity is spawned
*/ */
class EntitySpawnEvent extends EntityEvent{ class EntitySpawnEvent extends EntityEvent{
/** @var int */
private $entityType;
/** /**
* @param Entity $entity * @param Entity $entity
*/ */
public function __construct(Entity $entity){ public function __construct(Entity $entity){
$this->entity = $entity; $this->entity = $entity;
$this->entityType = $entity::NETWORK_ID;
} }
/** /**
@ -53,13 +50,6 @@ class EntitySpawnEvent extends EntityEvent{
return $this->entity->getPosition(); return $this->entity->getPosition();
} }
/**
* @return int
*/
public function getType() : int{
return $this->entityType;
}
/** /**
* @return bool * @return bool
*/ */