package gr.watchful.permchecker.datastructures;

import java.util.Comparator;

public class SimpleObjectComparator implements Comparator<Object> {
    @Override
    public int compare(Object o1, Object o2) {
		if(o1.getClass().equals(ModPack.class) && o2.getClass().equals(ModPack.class)) {
			ModPack pack1 = (ModPack) o1;
			ModPack pack2 = (ModPack) o2;
			if(pack1.name.equals(pack2.name)) return pack1.shortName.compareTo(pack2.shortName);
			else return pack1.name.compareTo(pack2.name);
		} else return o1.toString().toLowerCase().compareTo(o2.toString().toLowerCase());
    }
}

@@ -367,16 +367,30 @@
 k1.name.
+toLowerCase().
 equals(p
@@ -398,16 +398,30 @@
 ck2.name
+.toLowerCase()
 )) retur
@@ -434,24 +434,38 @@
 1.shortName.
+toLowerCase().
 compareTo(pa
@@ -477,16 +477,30 @@
 hortName
+.toLowerCase()
 );%0A%09%09%09el
@@ -520,16 +520,30 @@
 k1.name.
+toLowerCase().
 compareT
@@ -554,16 +554,30 @@
 ck2.name
+.toLowerCase()
 );%0A%09%09%7D e

Convert modpack names to lower case before comparing. Closes #93