mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-23 00:55:57 +00:00
Fix for .DS_Store folders in Mac
This commit is contained in:
parent
19436d4953
commit
a501020198
@ -157,7 +157,7 @@ class PluginAPI extends stdClass{
|
||||
console("[INFO] Loading Plugins...");
|
||||
$dir = dir(FILE_PATH."plugins/");
|
||||
while(false !== ($file = $dir->read())){
|
||||
if($file !== "." and $file !== ".."){
|
||||
if($file{0} !== "."){
|
||||
if(strtolower(substr($file, -3)) === "php"){
|
||||
$this->load(FILE_PATH."plugins/" . $file);
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ class ServerAPI extends stdClass{ //Yay! I can add anything to this class in run
|
||||
console("[INFO] Loading default APIs");
|
||||
$dir = dir(FILE_PATH."src/API/");
|
||||
while(false !== ($file = $dir->read())){
|
||||
if($file !== "." and $file !== ".."){
|
||||
if($file{0} !== "."){ //Hidden and upwards folders
|
||||
$API = basename($file, ".php");
|
||||
if(strtolower($API) !== "serverapi"){
|
||||
$name = strtolower(substr($API, 0, -3));
|
||||
|
Loading…
x
Reference in New Issue
Block a user