mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-12 16:59:44 +00:00
Player: fix bug in unloadChunk() causing entity artifacts on world change
This commit is contained in:
parent
de10e401bf
commit
75a4136ab2
@ -866,7 +866,7 @@ class Player extends Human implements CommandSender, ChunkLoader, ChunkListener,
|
||||
$world = $world ?? $this->world;
|
||||
$index = World::chunkHash($x, $z);
|
||||
if(isset($this->usedChunks[$index])){
|
||||
foreach($this->getWorld()->getChunkEntities($x, $z) as $entity){
|
||||
foreach($world->getChunkEntities($x, $z) as $entity){
|
||||
if($entity !== $this){
|
||||
$entity->despawnFrom($this);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user