mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-17 11:18:52 +00:00
Fixed #1161 PluginAPI::readYAML() and PluginAPI::writeYAML()
This commit is contained in:
parent
34378b5776
commit
6325a2298e
@ -179,11 +179,11 @@ class PluginAPI extends stdClass{
|
||||
}
|
||||
|
||||
public function readYAML($file){
|
||||
return Spyc::YAMLLoad(file_get_contents($file));
|
||||
return yaml_parse(preg_replace("#^([ ]*)([a-zA-Z_]{1}[^\:]*)\:#m", "$1\"$2\":", file_get_contents($file)));
|
||||
}
|
||||
|
||||
public function writeYAML($file, $data){
|
||||
return file_put_contents($file, Spyc::YAMLDump($data));
|
||||
return file_put_contents($file, yaml_emit($data, YAML_UTF8_ENCODING));
|
||||
}
|
||||
|
||||
public function init(){
|
||||
|
Loading…
x
Reference in New Issue
Block a user