}
}
public static void main(String[] args)
throws SlickException, FileNotFoundException, IOException, InvalidConfigurationException {
yamlSettings = new YamlConfiguration();
try {
yamlSettings.load("settings.yml");
} catch (FileNotFoundException e) {
yamlSettings.set("settings.yamlGridX", 20);
yamlSettings.set("settings.yamlGridY", 20);
yamlSettings.set("settings.yamlGridW", 20);
yamlSettings.set("settings.yamlGridH", 20);
yamlSettings.set("settings.title", "Title");
yamlSettings.set("settings.gui.yamlGuiFilename", "grid.yml");
yamlSettings.set("settings.gui.yamlElementPrefix", "e_");
yamlSettings.set("settings.gui.yamlLastID", "lid");
yamlSettings.save("settings.yml");
yamlSettings.load("settings.yml");
}
Source.yamlGridX = yamlSettings.getInt("settings.yamlGridX");
Source.yamlGridY = yamlSettings.getInt("settings.yamlGridY");
GuiElement.yamlGridW = yamlSettings.getInt("settings.yamlGridW");
GuiElement.yamlGridH = yamlSettings.getInt("settings.yamlGridH");
GuiElement.yamlGuiFilename = yamlSettings.getString("settings.gui.yamlGuiFilename");
GuiElement.yamlPrefix = yamlSettings.getString("settings.gui.yamlElementPrefix");
GuiElement.yamlLastID = yamlSettings.getString("settings.gui.yamlLastID");
String title = yamlSettings.getString("settings.title");
yamlElements = new YamlConfiguration();
try {
yamlElements.load(GuiElement.yamlGuiFilename);
} catch (FileNotFoundException e) {
yamlElements.set(GuiElement.yamlLastID, 0);