mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
Correct call of destruct chain to release PMF file locks at unload
This commit is contained in:
parent
f2927df2b3
commit
be83eaf521
4 changed files with 18 additions and 2 deletions
|
|
@ -45,6 +45,10 @@ class Level{
|
|||
$this->changedCount = array();
|
||||
}
|
||||
|
||||
public function close(){
|
||||
$this->__destruct();
|
||||
}
|
||||
|
||||
public function useChunk($X, $Z, Player $player){
|
||||
if(!isset($this->usedChunks[$X.".".$Z])){
|
||||
$this->usedChunks[$X.".".$Z] = array();
|
||||
|
|
@ -118,6 +122,7 @@ class Level{
|
|||
|
||||
public function __destruct(){
|
||||
$this->save();
|
||||
$this->level->close();
|
||||
unset($this->level);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue