mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-17 19:50:18 +00:00
Position: rename getWorldNonNull() to getWorld(), remove original getWorld()
This commit is contained in:
@@ -822,7 +822,7 @@ class NetworkSession{
|
||||
public function startUsingChunk(int $chunkX, int $chunkZ, \Closure $onCompletion) : void{
|
||||
Utils::validateCallableSignature(function(int $chunkX, int $chunkZ) : void{}, $onCompletion);
|
||||
|
||||
$world = $this->player->getLocation()->getWorldNonNull();
|
||||
$world = $this->player->getLocation()->getWorld();
|
||||
ChunkCache::getInstance($world, $this->compressor)->request($chunkX, $chunkZ)->onResolve(
|
||||
|
||||
//this callback may be called synchronously or asynchronously, depending on whether the promise is resolved yet
|
||||
@@ -830,7 +830,7 @@ class NetworkSession{
|
||||
if(!$this->isConnected()){
|
||||
return;
|
||||
}
|
||||
$currentWorld = $this->player->getLocation()->getWorldNonNull();
|
||||
$currentWorld = $this->player->getLocation()->getWorld();
|
||||
if($world !== $currentWorld or !$this->player->isUsingChunk($chunkX, $chunkZ)){
|
||||
$this->logger->debug("Tried to send no-longer-active chunk $chunkX $chunkZ in world " . $world->getFolderName());
|
||||
return;
|
||||
|
Reference in New Issue
Block a user