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.
This commit is contained in:
Dylan K. Taylor 2020-09-20 13:39:31 +01:00
parent 716de4d9d6
commit 7f43164776

View File

@ -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);
}