mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-06-03 18:42:37 +00:00
Fixed unknown data folders
This commit is contained in:
parent
d71167f66c
commit
f9c71f1800
@ -29,12 +29,11 @@ class ServerAPI extends stdClass{ //Yay! I can add anything to this class in run
|
||||
var $restart = false;
|
||||
private $server, $config, $apiList = array();
|
||||
function __construct(){
|
||||
console("[INFO] Starting ServerAPI server handler...");
|
||||
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);
|
||||
console("[INFO] Starting ServerAPI server handler...");
|
||||
file_put_contents(FILE_PATH."logs/packets.log", "");
|
||||
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...");
|
||||
|
@ -186,7 +186,7 @@ function logg($message, $name, $EOL = true, $level = 2, $close = false){
|
||||
$fpointers = array();
|
||||
}
|
||||
if(!isset($fpointers[$name]) or $fpointers[$name] === false){
|
||||
$fpointers[$name] = fopen(FILE_PATH."logs/".$name.".log", "ab");
|
||||
$fpointers[$name] = @fopen(FILE_PATH."logs/".$name.".log", "ab");
|
||||
}
|
||||
@fwrite($fpointers[$name], $message);
|
||||
if($close === true){
|
||||
|
Loading…
x
Reference in New Issue
Block a user