StatusCommand: fix condition order for TPS colour (#5366)

This commit is contained in:
Eren A. Akyol 2022-10-27 01:26:55 +03:00 committed by GitHub
parent e4548da173
commit fb31e6085e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -82,10 +82,10 @@ class StatusCommand extends VanillaCommand{
$sender->sendMessage(TextFormat::GOLD . "Uptime: " . TextFormat::RED . $uptime);
$tpsColor = TextFormat::GREEN;
if($server->getTicksPerSecond() < 17){
$tpsColor = TextFormat::GOLD;
}elseif($server->getTicksPerSecond() < 12){
if($server->getTicksPerSecond() < 12){
$tpsColor = TextFormat::RED;
}elseif($server->getTicksPerSecond() < 17){
$tpsColor = TextFormat::GOLD;
}
$sender->sendMessage(TextFormat::GOLD . "Current TPS: {$tpsColor}{$server->getTicksPerSecond()} ({$server->getTickUsage()}%)");