mirror of
https://github.com/Anvilcraft/modpacktools
synced 2024-05-19 20:04:07 +02:00
fix ListRelations alphabetical sorting
This commit is contained in:
parent
c7b6672601
commit
38d9f13547
|
@ -39,10 +39,10 @@ object DownloadMods : AbstractCommand("DownloadMods") {
|
|||
val json = MPJH.asWrapper
|
||||
val fileList = mutableListOf<FileOrLink>()
|
||||
for(
|
||||
rel in json!!.defaultVersion!!.getRelations(
|
||||
arrayOf("client"),
|
||||
if(args.getBoolean("all")) null else arrayOf("mod")
|
||||
)!!
|
||||
rel in json!!.defaultVersion!!.getRelations(
|
||||
arrayOf("client"),
|
||||
if(args.getBoolean("all")) null else arrayOf("mod")
|
||||
)!!
|
||||
) //TODO only client? what if someone wants a server?
|
||||
if(rel.hasFile())
|
||||
fileList.add(rel.file.get())
|
||||
|
|
|
@ -29,7 +29,9 @@ object ListRelations : AbstractCommand("ListRelations") {
|
|||
}
|
||||
|
||||
override fun execute(args: Namespace): CommandReturn {
|
||||
val metas = MPJH.getModMetas().sortedBy {it.name}
|
||||
val metas = MPJH.getModMetas().sortedWith(
|
||||
Comparator {a, b -> b.name?.let {a.name?.compareTo(it, true)} ?: 0}
|
||||
)
|
||||
|
||||
if(args.getBoolean("csv")) {
|
||||
metas.forEach {
|
||||
|
|
Loading…
Reference in a new issue