From eaa78fe84992ac869c64056fc410135a64b9f9c3 Mon Sep 17 00:00:00 2001 From: "Jack M. Taylor" <32965703+JackMD@users.noreply.github.com> Date: Thu, 14 Feb 2019 15:58:19 +0500 Subject: [PATCH] backport 205e13d88: Config: add getPath() (#2758) Config->getPath() returns the path of the config i.e. the place where the config file is located. --- src/pocketmine/utils/Config.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/pocketmine/utils/Config.php b/src/pocketmine/utils/Config.php index 13d47f4d8..9fbd06bb6 100644 --- a/src/pocketmine/utils/Config.php +++ b/src/pocketmine/utils/Config.php @@ -248,6 +248,15 @@ class Config{ } } + /** + * Returns the path of the config. + * + * @return string + */ + public function getPath() : string{ + return $this->file; + } + /** * Sets the options for the JSON encoding when saving *