diff --git a/src/player/Player.php b/src/player/Player.php index 904bf5793..500e8b800 100644 --- a/src/player/Player.php +++ b/src/player/Player.php @@ -300,14 +300,6 @@ class Player extends Human implements CommandSender, ChunkListener, IPlayer{ $this->chunkLoader = new PlayerChunkLoader($spawnLocation); - $world = $spawnLocation->getWorld(); - //load the spawn chunk so we can see the terrain - $xSpawnChunk = $spawnLocation->getFloorX() >> Chunk::COORD_BIT_SIZE; - $zSpawnChunk = $spawnLocation->getFloorZ() >> Chunk::COORD_BIT_SIZE; - $world->registerChunkLoader($this->chunkLoader, $xSpawnChunk, $zSpawnChunk, true); - $world->registerChunkListener($this, $xSpawnChunk, $zSpawnChunk); - $this->usedChunks[World::chunkHash($xSpawnChunk, $zSpawnChunk)] = UsedChunkStatus::NEEDED(); - parent::__construct($spawnLocation, $this->playerInfo->getSkin(), $namedtag); } diff --git a/src/utils/Timezone.php b/src/utils/Timezone.php index 02110c0eb..3cf3a19df 100644 --- a/src/utils/Timezone.php +++ b/src/utils/Timezone.php @@ -208,7 +208,7 @@ abstract class Timezone{ //That's been a bug in PHP since 2008! foreach(timezone_abbreviations_list() as $zones){ foreach($zones as $timezone){ - if($timezone['offset'] == $offset){ + if($timezone['timezone_id'] !== null && $timezone['offset'] == $offset){ return $timezone['timezone_id']; } }