From 7f43164776afbfc3e3ea54aa018c941fef88587d Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Sun, 20 Sep 2020 13:39:31 +0100 Subject: [PATCH] Player: Loading chunks during unloading chunks is a BIG nope this should never happen, but it could have happened if there was a bug in the code for some reason. Readers note: I know this looks lik I'm undoing the changes I just did, but what really happened is a name change. --- src/player/Player.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/player/Player.php b/src/player/Player.php index c8cb135f3..9d9f8b607 100644 --- a/src/player/Player.php +++ b/src/player/Player.php @@ -733,7 +733,7 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{ $world = $world ?? $this->getWorld(); $index = World::chunkHash($x, $z); if(isset($this->usedChunks[$index])){ - foreach($world->getOrLoadChunk($x, $z)->getEntities() as $entity){ + foreach($world->getChunk($x, $z)->getEntities() as $entity){ if($entity !== $this){ $entity->despawnFrom($this); }