Fixing folder related bugs
This commit is contained in:
parent
4b5cdeed6e
commit
6d636e7443
1 changed files with 2 additions and 8 deletions
|
@ -115,10 +115,7 @@ class LootTable {
|
|||
* @return string
|
||||
*/
|
||||
public static function getPluginFolder(): string {
|
||||
$dir = explode(DIRECTORY_SEPARATOR, __DIR__);
|
||||
$c = count($dir);
|
||||
unset($dir[$c - 1], $dir[$c - 2], $dir[$c - 3], $dir[$c - 4], $dir[$c - 5]);
|
||||
return str_ireplace("phar://", "", implode(DIRECTORY_SEPARATOR, $dir)) . DIRECTORY_SEPARATOR . "BetterGen" . DIRECTORY_SEPARATOR;
|
||||
return getcwd() . DIRECTORY_SEPARATOR . "BetterGen" . DIRECTORY_SEPARATOR;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -126,9 +123,6 @@ class LootTable {
|
|||
* @return string
|
||||
*/
|
||||
public static function getResourcesFolder(): string {
|
||||
$dir = explode(DIRECTORY_SEPARATOR, __DIR__);
|
||||
$c = count($dir);
|
||||
unset($dir[$c - 1], $dir[$c - 2], $dir[$c - 3], $dir[$c - 4]);
|
||||
return str_ireplace("phar://", "", implode(DIRECTORY_SEPARATOR, $dir)) . DIRECTORY_SEPARATOR . "resources" . DIRECTORY_SEPARATOR;
|
||||
return self::getPluginFolder() . "resources" . DIRECTORY_SEPARATOR;
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue