mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-07 20:28:31 +00:00
Player: Assume that usedChunks was cleared by the previous loop
This commit is contained in:
parent
ede4d58394
commit
db28358316
@ -98,6 +98,7 @@ use pocketmine\permission\PermissibleBase;
|
|||||||
use pocketmine\permission\PermissibleDelegateTrait;
|
use pocketmine\permission\PermissibleDelegateTrait;
|
||||||
use pocketmine\Server;
|
use pocketmine\Server;
|
||||||
use pocketmine\timings\Timings;
|
use pocketmine\timings\Timings;
|
||||||
|
use pocketmine\utils\AssumptionFailedError;
|
||||||
use pocketmine\utils\TextFormat;
|
use pocketmine\utils\TextFormat;
|
||||||
use pocketmine\world\ChunkListener;
|
use pocketmine\world\ChunkListener;
|
||||||
use pocketmine\world\ChunkListenerNoOpTrait;
|
use pocketmine\world\ChunkListenerNoOpTrait;
|
||||||
@ -2002,7 +2003,9 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{
|
|||||||
$this->unloadChunk($chunkX, $chunkZ);
|
$this->unloadChunk($chunkX, $chunkZ);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$this->usedChunks = [];
|
if(count($this->usedChunks) !== 0){
|
||||||
|
throw new AssumptionFailedError("Previous loop should have cleared this array");
|
||||||
|
}
|
||||||
$this->loadQueue = [];
|
$this->loadQueue = [];
|
||||||
|
|
||||||
$this->removeCurrentWindow();
|
$this->removeCurrentWindow();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user