Unnecessary arguments in the if expression

This commit is contained in:
Sunch 2024-08-17 19:58:16 +08:00
parent f9f4e65571
commit 4630481d54
9 changed files with 13 additions and 13 deletions

View file

@ -376,7 +376,7 @@ class Level{
if(count($this->players) == 0) return false;
if($this->server->api->time->getPhase($this) === "night"){ //TODO vanilla
foreach($this->players as $p){
if($p->isSleeping == false || $p->sleepingTime < 100){
if(!$p->isSleeping || $p->sleepingTime < 100){
return false;
}
}
@ -906,7 +906,7 @@ class Level{
return false;
}
$now = microtime(true);
if($this->stopTime == true){
if($this->stopTime){
$time = $this->startTime;
}else{
$time = $this->startTime + ($now - $this->startCheck) * 20;