mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-03 10:32:33 +00:00
Updated folders
This commit is contained in:
parent
8abc36acd4
commit
b5c191530a
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,11 +1,11 @@
|
||||
players/*
|
||||
worlds/*
|
||||
plugins/*
|
||||
logs/*
|
||||
*.log
|
||||
server.properties
|
||||
white-list.txt
|
||||
banned-ips.txt
|
||||
console.in
|
||||
|
||||
#################
|
||||
## Eclipse
|
||||
|
@ -30,7 +30,7 @@ class ConsoleAPI{
|
||||
function __construct(PocketMinecraftServer $server){
|
||||
$this->help = array();
|
||||
$this->server = $server;
|
||||
$this->input = fopen(FILE_PATH."src/console.in", "w+b");
|
||||
$this->input = fopen(FILE_PATH."logs/console.in", "w+b");
|
||||
$this->last = microtime(true);
|
||||
}
|
||||
|
||||
|
@ -30,9 +30,14 @@ class ServerAPI extends stdClass{ //Yay! I can add anything to this class in run
|
||||
private $server, $config, $apiList = array();
|
||||
function __construct(){
|
||||
console("[INFO] Starting ServerAPI server handler...");
|
||||
file_put_contents(FILE_PATH."packets.log", "");
|
||||
file_put_contents(FILE_PATH."console.in", "");
|
||||
if(!file_exists(FILE_PATH."test.bin.log") or md5_file(FILE_PATH."test.bin.log") !== TEST_MD5){
|
||||
console("[DEBUG] Checking data folders...", true, true, 2);
|
||||
@mkdir(FILE_PATH."logs/", 0777, true);
|
||||
@mkdir(FILE_PATH."players/", 0777);
|
||||
@mkdir(FILE_PATH."worlds/", 0777);
|
||||
@mkdir(FILE_PATH."plugins/", 0777);
|
||||
file_put_contents(FILE_PATH."logs/packets.log", "");
|
||||
file_put_contents(FILE_PATH."logs/console.in", "");
|
||||
if(!file_exists(FILE_PATH."logs/test.bin.log") or md5_file(FILE_PATH."logs/test.bin.log") !== TEST_MD5){
|
||||
console("[NOTICE] Executing integrity tests...");
|
||||
console("[INFO] OS: ".PHP_OS.", ".Utils::getOS());
|
||||
console("[INFO] uname -a: ".php_uname("a"));
|
||||
@ -60,7 +65,7 @@ class ServerAPI extends stdClass{ //Yay! I can add anything to this class in run
|
||||
$test .= Utils::writeLong($str->hashCode());
|
||||
$test .= Utils::writeDataArray(array("a", "b", "c", "\xff\xff\xff\xff"));
|
||||
$test .= Utils::hexToStr("012334567890");
|
||||
file_put_contents(FILE_PATH."test.bin.log", $test);
|
||||
file_put_contents(FILE_PATH."logs/test.bin.log", $test);
|
||||
if(md5($test) !== TEST_MD5){
|
||||
console("[ERROR] Test error, please send your console.log + test.bin.log to the Github repo");
|
||||
die();
|
||||
@ -82,11 +87,6 @@ class ServerAPI extends stdClass{ //Yay! I can add anything to this class in run
|
||||
copy(FILE_PATH."src/common/default.properties", FILE_PATH."server.properties");
|
||||
}
|
||||
|
||||
console("[DEBUG] Checking data folders...", true, true, 2);
|
||||
@mkdir(FILE_PATH."players/", 0777, true);
|
||||
@mkdir(FILE_PATH."worlds/", 0777);
|
||||
@mkdir(FILE_PATH."plugins/", 0777);
|
||||
|
||||
console("[DEBUG] Loading server.properties...", true, true, 2);
|
||||
$this->parseProperties();
|
||||
define("DEBUG", $this->config["debug"]);
|
||||
|
@ -30,7 +30,7 @@ class PocketMinecraftServer extends stdClass{
|
||||
private $database, $interface, $evCnt, $handCnt, $events, $handlers, $version, $serverType, $lastTick;
|
||||
function __construct($name, $gamemode = 1, $seed = false, $protocol = CURRENT_PROTOCOL, $port = 19132, $serverID = false, $version = CURRENT_VERSION){
|
||||
$this->port = (int) $port; //19132 - 19135
|
||||
console("[INFO] PocketMine-MP ".MAJOR_VERSION." by @shoghicp, LGPL License. http://bit.ly/TbrimG", true, true, 0);
|
||||
console("[INFO] PocketMine-MP ".MAJOR_VERSION." by @shoghicp, LGPL License", true, true, 0);
|
||||
console("[INFO] Starting Minecraft PE Server at *:".$this->port);
|
||||
if($this->port < 19132 or $this->port > 19135){
|
||||
console("[WARNING] You've selected a not-standard port. Normal port range is from 19132 to 19135 included");
|
||||
|
@ -170,7 +170,7 @@ function logg($message, $name, $EOL = true, $level = 2, $close = false){
|
||||
$fpointers = array();
|
||||
}
|
||||
if(!isset($fpointers[$name])){
|
||||
$fpointers[$name] = fopen(FILE_PATH."/".$name.".log", "ab");
|
||||
$fpointers[$name] = fopen(FILE_PATH."logs/".$name.".log", "ab");
|
||||
}
|
||||
fwrite($fpointers[$name], $message);
|
||||
if($close === true){
|
||||
|
@ -25,7 +25,7 @@ the Free Software Foundation, either version 3 of the License, or
|
||||
|
||||
*/
|
||||
|
||||
$fp = fopen(dirname(__FILE__)."/console.in","wb");
|
||||
$fp = fopen(dirname(__FILE__)."/../../logs/console.in","wb");
|
||||
while(true){
|
||||
$l = fgets(STDIN);
|
||||
fwrite($fp, $l);
|
Loading…
x
Reference in New Issue
Block a user