mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 01:09:44 +00:00
Fixed /reload
This commit is contained in:
parent
392f0110bb
commit
694ccf2bc5
@ -174,7 +174,7 @@ abstract class PluginBase implements Plugin{
|
|||||||
*
|
*
|
||||||
* @param string $filename
|
* @param string $filename
|
||||||
*
|
*
|
||||||
* @return \SplFileObject Resource data, or null
|
* @return resource Resource data, or null
|
||||||
*/
|
*/
|
||||||
public function getResource($filename){
|
public function getResource($filename){
|
||||||
$filename = rtrim(str_replace("\\", "/", $filename), "/");
|
$filename = rtrim(str_replace("\\", "/", $filename), "/");
|
||||||
|
@ -39,11 +39,11 @@ class Config{
|
|||||||
const ENUMERATION = Config::ENUM;
|
const ENUMERATION = Config::ENUM;
|
||||||
|
|
||||||
/** @var array */
|
/** @var array */
|
||||||
private $config;
|
private $config = [];
|
||||||
/** @var string */
|
/** @var string */
|
||||||
private $file;
|
private $file;
|
||||||
/** @var boolean */
|
/** @var boolean */
|
||||||
private $correct;
|
private $correct = false;
|
||||||
/** @var integer */
|
/** @var integer */
|
||||||
private $type = Config::DETECT;
|
private $type = Config::DETECT;
|
||||||
|
|
||||||
@ -80,8 +80,8 @@ class Config{
|
|||||||
* Removes all the changes in memory and loads the file again
|
* Removes all the changes in memory and loads the file again
|
||||||
*/
|
*/
|
||||||
public function reload(){
|
public function reload(){
|
||||||
unset($this->config);
|
$this->config = [];
|
||||||
unset($this->correct);
|
$this->correct = false;
|
||||||
unset($this->type);
|
unset($this->type);
|
||||||
$this->load($this->file);
|
$this->load($this->file);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user