mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-18 09:24:05 +00:00
Added memory-limit option
This commit is contained in:
parent
4a46fde483
commit
11f4096403
@ -212,6 +212,11 @@ class ServerAPI extends stdClass{ //Yay! I can add anything to this class in run
|
|||||||
}
|
}
|
||||||
|
|
||||||
private function loadProperties(){
|
private function loadProperties(){
|
||||||
|
if(isset($this->config["memory-limit"])){
|
||||||
|
@ini_set("memory_limit", $this->config["memory-limit"]);
|
||||||
|
}else{
|
||||||
|
$this->config["memory-limit"] = "256M";
|
||||||
|
}
|
||||||
if(is_object($this->server)){
|
if(is_object($this->server)){
|
||||||
$this->server->setType($this->config["server-type"]);
|
$this->server->setType($this->config["server-type"]);
|
||||||
$this->server->timePerSecond = $this->config["time-per-second"];
|
$this->server->timePerSecond = $this->config["time-per-second"];
|
||||||
|
@ -29,11 +29,12 @@ set_time_limit(0);
|
|||||||
date_default_timezone_set(@date_default_timezone_get());
|
date_default_timezone_set(@date_default_timezone_get());
|
||||||
gc_enable();
|
gc_enable();
|
||||||
error_reporting(E_ALL ^ E_NOTICE);
|
error_reporting(E_ALL ^ E_NOTICE);
|
||||||
|
ini_set("allow_url_fopen", 1);
|
||||||
ini_set("display_errors", 1);
|
ini_set("display_errors", 1);
|
||||||
ini_set('default_charset', 'utf-8');
|
ini_set('default_charset', 'utf-8');
|
||||||
define("FILE_PATH", dirname(__FILE__)."/../");
|
define("FILE_PATH", dirname(__FILE__)."/../");
|
||||||
set_include_path(get_include_path() . PATH_SEPARATOR . FILE_PATH . PATH_SEPARATOR . FILE_PATH . "/classes/");
|
set_include_path(get_include_path() . PATH_SEPARATOR . FILE_PATH . PATH_SEPARATOR . FILE_PATH . "/classes/");
|
||||||
ini_set("memory_limit", "1024M");
|
ini_set("memory_limit", "256M");
|
||||||
define("CURRENT_PROTOCOL", 5);
|
define("CURRENT_PROTOCOL", 5);
|
||||||
define("CURRENT_VERSION", 1);
|
define("CURRENT_VERSION", 1);
|
||||||
define("LOG", true);
|
define("LOG", true);
|
||||||
|
@ -4,6 +4,7 @@ description= This is a Work in Progress custom server.
|
|||||||
motd=Welcome to PHP Server
|
motd=Welcome to PHP Server
|
||||||
port=19132
|
port=19132
|
||||||
protocol=CURRENT
|
protocol=CURRENT
|
||||||
|
memory-limit=256M
|
||||||
last-update=false
|
last-update=false
|
||||||
white-list=false
|
white-list=false
|
||||||
debug=2
|
debug=2
|
||||||
|
@ -86,17 +86,72 @@ $pstruct = array(
|
|||||||
"customData",
|
"customData",
|
||||||
),
|
),
|
||||||
|
|
||||||
|
|
||||||
|
0x81 => array(
|
||||||
|
"itriad",
|
||||||
|
"ubyte",
|
||||||
|
"customData",
|
||||||
|
),
|
||||||
|
|
||||||
|
0x82 => array(
|
||||||
|
"itriad",
|
||||||
|
"ubyte",
|
||||||
|
"customData",
|
||||||
|
),
|
||||||
|
|
||||||
|
0x83 => array(
|
||||||
|
"itriad",
|
||||||
|
"ubyte",
|
||||||
|
"customData",
|
||||||
|
),
|
||||||
|
|
||||||
0x84 => array(
|
0x84 => array(
|
||||||
"itriad",
|
"itriad",
|
||||||
"ubyte",
|
"ubyte",
|
||||||
"customData",
|
"customData",
|
||||||
),
|
),
|
||||||
|
|
||||||
|
0x85 => array(
|
||||||
|
"itriad",
|
||||||
|
"ubyte",
|
||||||
|
"customData",
|
||||||
|
),
|
||||||
|
|
||||||
|
0x86 => array(
|
||||||
|
"itriad",
|
||||||
|
"ubyte",
|
||||||
|
"customData",
|
||||||
|
),
|
||||||
|
|
||||||
|
0x87 => array(
|
||||||
|
"itriad",
|
||||||
|
"ubyte",
|
||||||
|
"customData",
|
||||||
|
),
|
||||||
|
|
||||||
0x88 => array(
|
0x88 => array(
|
||||||
"itriad",
|
"itriad",
|
||||||
"ubyte",
|
"ubyte",
|
||||||
"customData",
|
"customData",
|
||||||
),
|
),
|
||||||
|
|
||||||
|
0x89 => array(
|
||||||
|
"itriad",
|
||||||
|
"ubyte",
|
||||||
|
"customData",
|
||||||
|
),
|
||||||
|
|
||||||
|
0x8a => array(
|
||||||
|
"itriad",
|
||||||
|
"ubyte",
|
||||||
|
"customData",
|
||||||
|
),
|
||||||
|
|
||||||
|
0x8b => array(
|
||||||
|
"itriad",
|
||||||
|
"ubyte",
|
||||||
|
"customData",
|
||||||
|
),
|
||||||
|
|
||||||
0x8c => array(
|
0x8c => array(
|
||||||
"itriad",
|
"itriad",
|
||||||
@ -104,6 +159,26 @@ $pstruct = array(
|
|||||||
"customData",
|
"customData",
|
||||||
),
|
),
|
||||||
|
|
||||||
|
0x8d => array(
|
||||||
|
"itriad",
|
||||||
|
"ubyte",
|
||||||
|
"customData",
|
||||||
|
),
|
||||||
|
|
||||||
|
0x8e => array(
|
||||||
|
"itriad",
|
||||||
|
"ubyte",
|
||||||
|
"customData",
|
||||||
|
),
|
||||||
|
|
||||||
|
0x8f => array(
|
||||||
|
"itriad",
|
||||||
|
"ubyte",
|
||||||
|
"customData",
|
||||||
|
),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
0xa0 => array(
|
0xa0 => array(
|
||||||
"short",
|
"short",
|
||||||
"bool",
|
"bool",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user