mirror of
https://github.com/GTNewHorizons/CraftTweaker.git
synced 2026-11-21 12:32:29 +00:00
Fixed crash when there is only 1 script file
This commit is contained in:
1 parent
dd2857e540
commit
c91991661f
5 files changed
+11
-10
No files matched your search
+7
-6
@@ -48,12 +48,13 @@ public class ScriptProviderDirectory implements IScriptProvider {
|
||||
}
|
||||
}
|
||||
}
|
||||
scripts.sort(new Comparator<IScriptIterator>() {
|
||||
@Override
|
||||
public int compare(IScriptIterator sc, IScriptIterator sc1) {
|
||||
return sc.getName().compareTo(sc1.getName());
|
||||
}
|
||||
});
|
||||
if (scripts.size() > 1)
|
||||
scripts.sort(new Comparator<IScriptIterator>() {
|
||||
@Override
|
||||
public int compare(IScriptIterator sc, IScriptIterator sc1) {
|
||||
return sc.getName().compareTo(sc1.getName());
|
||||
}
|
||||
});
|
||||
return scripts.iterator();
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user