Assume the player is online when they are, uh, assumed to be online

the checks removed here should never be hit under normal circumstances. If they were hit, they'd just conceal bugs which would cause a crash to happen later anyway.
This commit is contained in:
Dylan K. Taylor
2019-05-07 19:49:06 +01:00
parent 78bb6f4a0c
commit cf0c0e72a9
5 changed files with 6 additions and 24 deletions

View File

@ -1129,10 +1129,6 @@ class Player extends Human implements CommandSender, ChunkLoader, ChunkListener,
}
public function doChunkRequests(){
if(!$this->isOnline()){
return;
}
if($this->nextChunkOrderRun !== PHP_INT_MAX and $this->nextChunkOrderRun-- <= 0){
$this->nextChunkOrderRun = PHP_INT_MAX;
$this->orderChunks();
@ -1192,10 +1188,6 @@ class Player extends Human implements CommandSender, ChunkLoader, ChunkListener,
* @return bool
*/
public function sleepOn(Vector3 $pos) : bool{
if(!$this->isOnline()){
return false;
}
$pos = $pos->floor();
$b = $this->world->getBlock($pos);