public static void checkRank(Player player, int mode, String boss) {
		long dominionFactor = player.getDominionTower().getTotalScore();
		for (int i = 0; i < ranks.length; i++) {
			DTRank rank = ranks[i];
			if (rank == null)
				break;
			if (rank.username.equalsIgnoreCase(player.getUsername())) {
				ranks[i] = new DTRank(player, mode, boss);
				sort();
				return;
			}
		}
		for (int i = 0; i < ranks.length; i++) {
			DTRank rank = ranks[i];
			if (rank == null) {
				ranks[i] = new DTRank(player, mode, boss);
				sort();
				return;
			}
		}
		for (int i = 0; i < ranks.length; i++) {
			if (ranks[i].dominionFactor < dominionFactor) {
				ranks[i] = new DTRank(player, mode, boss);
				sort();
				return;
			}
		}
	}