mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-22 20:49:43 +00:00
Remove teleporting players from the other world
This commit is contained in:
parent
3fca7ab6a5
commit
78baa237e3
1 changed files with 5 additions and 0 deletions
|
|
@ -591,6 +591,11 @@ class Player{
|
||||||
if($pos instanceof Position and $pos->level !== $this->level){
|
if($pos instanceof Position and $pos->level !== $this->level){
|
||||||
foreach($this->server->api->entity->getAll($this->level) as $e){
|
foreach($this->server->api->entity->getAll($this->level) as $e){
|
||||||
if($e !== $this->entity){
|
if($e !== $this->entity){
|
||||||
|
if($e->player instanceof Player){
|
||||||
|
$e->player->dataPacket(MC_REMOVE_ENTITY, array(
|
||||||
|
"eid" => $this->eid,
|
||||||
|
));
|
||||||
|
}
|
||||||
$this->dataPacket(MC_REMOVE_ENTITY, array(
|
$this->dataPacket(MC_REMOVE_ENTITY, array(
|
||||||
"eid" => $e->eid,
|
"eid" => $e->eid,
|
||||||
));
|
));
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue