mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-06 01:51:51 +00:00
Fixed spawning despawned entities
This commit is contained in:
parent
4867533ab7
commit
199fbb644b
@ -439,11 +439,14 @@ class Entity extends stdClass{
|
|||||||
if(!($player instanceof Player)){
|
if(!($player instanceof Player)){
|
||||||
$player = $this->server->api->player->get($player);
|
$player = $this->server->api->player->get($player);
|
||||||
}
|
}
|
||||||
if($player->eid === $this->eid){
|
if($player->eid === $this->eid or $this->closed !== false){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
switch($this->class){
|
switch($this->class){
|
||||||
case ENTITY_PLAYER:
|
case ENTITY_PLAYER:
|
||||||
|
if($this->player->connected !== true){
|
||||||
|
return false;
|
||||||
|
}
|
||||||
$player->dataPacket(MC_ADD_PLAYER, array(
|
$player->dataPacket(MC_ADD_PLAYER, array(
|
||||||
"clientID" => 0,/*$this->player->clientID,*/
|
"clientID" => 0,/*$this->player->clientID,*/
|
||||||
"username" => $this->player->username,
|
"username" => $this->player->username,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user