StatusCommand: fixed output of global memory limit (#5090)

Fix incorrect "Maximum memory (manager)" output
This commit is contained in:
NoClip 2022-06-04 23:41:55 +07:00 committed by GitHub
parent d15a90899e
commit e12e4e8fb8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -103,7 +103,7 @@ class StatusCommand extends VanillaCommand{
$globalLimit = $server->getMemoryManager()->getGlobalMemoryLimit();
if($globalLimit > 0){
$sender->sendMessage(TextFormat::GOLD . "Maximum memory (manager): " . TextFormat::RED . number_format(round($globalLimit, 2), 2) . " MB.");
$sender->sendMessage(TextFormat::GOLD . "Maximum memory (manager): " . TextFormat::RED . number_format(round(($globalLimit / 1024) / 1024, 2), 2) . " MB.");
}
foreach($server->getWorldManager()->getWorlds() as $world){