mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
Noob-proof memory-limit server property
This commit is contained in:
parent
a6cc0f8261
commit
44fcf4a6ed
@ -248,7 +248,7 @@ class ServerAPI{
|
||||
|
||||
|
||||
private function loadProperties(){
|
||||
if(($memory = $this->getProperty("memory-limit")) !== false){
|
||||
if(($memory = str_replace("B", "", strtoupper($this->getProperty("memory-limit")))) !== false){
|
||||
$value = array("M" => 1, "G" => 1024);
|
||||
$real = ((int) substr($memory, 0, -1)) * $value[substr($memory, -1)];
|
||||
if($real < 128){
|
||||
|
Loading…
x
Reference in New Issue
Block a user