Load plugins in alphabetical-ish order.
This commit is contained in:
parent
50f8bd2eb0
commit
384228b751
@ -259,7 +259,10 @@ public class PluginManager
|
|||||||
Preconditions.checkNotNull( folder, "folder" );
|
Preconditions.checkNotNull( folder, "folder" );
|
||||||
Preconditions.checkArgument( folder.isDirectory(), "Must load from a directory" );
|
Preconditions.checkArgument( folder.isDirectory(), "Must load from a directory" );
|
||||||
|
|
||||||
for ( File file : folder.listFiles() )
|
File[] files = folder.listFiles();
|
||||||
|
Arrays.sort( files );
|
||||||
|
|
||||||
|
for ( File file : files )
|
||||||
{
|
{
|
||||||
if ( file.isFile() && file.getName().endsWith( ".jar" ) )
|
if ( file.isFile() && file.getName().endsWith( ".jar" ) )
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user