mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 19:02:59 +00:00
Create PMF Levels
This commit is contained in:
@ -53,7 +53,7 @@ class PMF{
|
||||
|
||||
public function load($file){
|
||||
$this->close();
|
||||
$this->file = realpath($file);
|
||||
$this->file = $file;
|
||||
if(($this->fp = @fopen($file, "c+b")) !== false){
|
||||
fseek($this->fp, 0, SEEK_END);
|
||||
if(ftell($this->fp) >= 5){ //Header + 2 Bytes
|
||||
@ -95,7 +95,8 @@ class PMF{
|
||||
}
|
||||
|
||||
public function create($file, $type, $version = PMF_CURRENT_VERSION){
|
||||
$this->file = realpath($file);
|
||||
$this->file = $file;
|
||||
@mkdir(dirname($this->file), 0755, true);
|
||||
if(!is_resource($this->fp)){
|
||||
if(($this->fp = @fopen($file, "c+b")) === false){
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user