mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-13 09:19:42 +00:00
Merge branch 'stable'
This commit is contained in:
commit
df8db3b8e3
@ -48,7 +48,9 @@ use function is_a;
|
||||
use function is_array;
|
||||
use function is_dir;
|
||||
use function is_subclass_of;
|
||||
use function iterator_to_array;
|
||||
use function mkdir;
|
||||
use function shuffle;
|
||||
use function stripos;
|
||||
use function strpos;
|
||||
use function strtolower;
|
||||
@ -217,12 +219,11 @@ class PluginManager{
|
||||
}else{
|
||||
$loaders = $this->fileAssociations;
|
||||
}
|
||||
|
||||
$files = iterator_to_array(new \FilesystemIterator($directory, \FilesystemIterator::CURRENT_AS_PATHNAME | \FilesystemIterator::SKIP_DOTS));
|
||||
shuffle($files); //this prevents plugins implicitly relying on the filesystem name order when they should be using dependency properties
|
||||
foreach($loaders as $loader){
|
||||
foreach(new \DirectoryIterator($directory) as $file){
|
||||
if($file === "." or $file === ".."){
|
||||
continue;
|
||||
}
|
||||
$file = $directory . $file;
|
||||
foreach($files as $file){
|
||||
if(!$loader->canLoadPlugin($file)){
|
||||
continue;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user