<commit_before>package com.pixelyeti.goldsiege.GameMechs;

import com.pixelyeti.goldsiege.Main;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.file.FileConfiguration;

import javax.security.auth.login.Configuration;
import java.util.Random;

/**
 * Created by Callum on 11/06/2015.
 */
public class MapManager {

    public static Map[] maps = null;
    public static int count = 0;

    public static final void initiateMaps() {
        FileConfiguration config = Main.plugin.getConfigFile(); // <----------- ERRORING FOR NO REASON D:
        ConfigurationSection configSection = config.getConfigurationSection("Maps");

        int mapsSize = 0;

        for (String s : configSection.getKeys(false)) {
            mapsSize += 1;
        }

        maps = new Map[mapsSize];

        for (String s : configSection.getKeys(false)) {

            String name = config.getString("Maps." + s + ".Name");
            int numTeams = config.getInt("Maps." + s + ".NumTeams");
            String worldFileName = config.getString("Maps." + s + ".WorldFileName");
            boolean saving = config.getBoolean("Maps." + s + ".Saving");

            maps[count] = new Map(name, numTeams, worldFileName, saving, Map.loadSpawns(name));

            count++;
        }
    }

    public static Map selectMap() {
        Map map = null;
        Random rand = new Random();

        int randNum = rand.nextInt(((maps.length - 1) - 0) +1);
        map = maps[randNum];
<commit_msg>Update MapManager.java<commit_after>package com.pixelyeti.goldsiege.GameMechs;

import com.pixelyeti.goldsiege.Main;
import org.bukkit.configuration.ConfigurationSection;
import org.bukkit.configuration.file.FileConfiguration;

import javax.security.auth.login.Configuration;
import java.util.Random;

/**
 * Created by Callum on 11/06/2015.
 */
public class MapManager {

    public static Map[] maps = null;
    public static int count = 0;

    public static final void initiateMaps() {
        FileConfiguration config = Main.plugin.getConfigFile(); // <----------- ERRORING FOR NO REASON D:
        ConfigurationSection configSection = config.getConfigurationSection("Maps");

        int mapsSize = 0;

        for (String s : configSection.getKeys(false)) {
            mapsSize++;
        }

        maps = new Map[mapsSize];

        for (String s : configSection.getKeys(false)) {

            String name = config.getString("Maps." + s + ".Name");
            int numTeams = config.getInt("Maps." + s + ".NumTeams");
            String worldFileName = config.getString("Maps." + s + ".WorldFileName");
            boolean saving = config.getBoolean("Maps." + s + ".Saving");

            maps[count] = new Map(name, numTeams, worldFileName, saving, Map.loadSpawns(name));

            count++;
        }
    }

    public static Map selectMap() {
        Map map = null;
        Random rand = new Random();

        int randNum = rand.nextInt(((maps.length - 1) - 0) +1);
        map = maps[randNum];

{'fraction_non_alphanumeric': 0.1295559973492379, 'fraction_numerical': 0.008946322067594433, 'mean_word_length': 2.5475910693302, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6032667', 'n_tokens_mistral': 894, 'n_tokens_neox': 846, 'n_words': 218}