mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-07-24 20:04:28 +00:00
StatusCommand: fix condition order for TPS colour (#5366)
This commit is contained in:
parent
e4548da173
commit
fb31e6085e
@ -82,10 +82,10 @@ class StatusCommand extends VanillaCommand{
|
|||||||
$sender->sendMessage(TextFormat::GOLD . "Uptime: " . TextFormat::RED . $uptime);
|
$sender->sendMessage(TextFormat::GOLD . "Uptime: " . TextFormat::RED . $uptime);
|
||||||
|
|
||||||
$tpsColor = TextFormat::GREEN;
|
$tpsColor = TextFormat::GREEN;
|
||||||
if($server->getTicksPerSecond() < 17){
|
if($server->getTicksPerSecond() < 12){
|
||||||
$tpsColor = TextFormat::GOLD;
|
|
||||||
}elseif($server->getTicksPerSecond() < 12){
|
|
||||||
$tpsColor = TextFormat::RED;
|
$tpsColor = TextFormat::RED;
|
||||||
|
}elseif($server->getTicksPerSecond() < 17){
|
||||||
|
$tpsColor = TextFormat::GOLD;
|
||||||
}
|
}
|
||||||
|
|
||||||
$sender->sendMessage(TextFormat::GOLD . "Current TPS: {$tpsColor}{$server->getTicksPerSecond()} ({$server->getTickUsage()}%)");
|
$sender->sendMessage(TextFormat::GOLD . "Current TPS: {$tpsColor}{$server->getTicksPerSecond()} ({$server->getTickUsage()}%)");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user