From 384228b7511f5f91d6691a62a90c4f7a78090937 Mon Sep 17 00:00:00 2001 From: Steve Anton Date: Sat, 27 Apr 2013 23:46:45 -0700 Subject: [PATCH] Load plugins in alphabetical-ish order. --- .../main/java/net/md_5/bungee/api/plugin/PluginManager.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/api/src/main/java/net/md_5/bungee/api/plugin/PluginManager.java b/api/src/main/java/net/md_5/bungee/api/plugin/PluginManager.java index c2e3289f..ce30f2d8 100644 --- a/api/src/main/java/net/md_5/bungee/api/plugin/PluginManager.java +++ b/api/src/main/java/net/md_5/bungee/api/plugin/PluginManager.java @@ -259,7 +259,10 @@ public class PluginManager Preconditions.checkNotNull( folder, "folder" ); 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" ) ) {