public class GameServerBrowserSorter extends ViewerSorter {
@Override
public int compare(Viewer viewer, Object obj1, Object obj2) {
if (obj1 instanceof GameServer && obj2 instanceof GameServer) {
GameServer g1 = (GameServer) obj1;
GameServer g2 = (GameServer) obj2;
if (g1.ping < 0 && g2.ping < 0) {
return g2.ping - g1.ping;
}
if (g1.ping < 0)
return 1;