Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- protected void loadSettingsFromYaml() {
- Map<String, Guidata> yamlData = new HashMap<>();
- ConfigurationSection MainConfigKeys = customConfig.getConfigurationSection("Gui_Templets");
- if (MainConfigKeys != null) {
- for (String mainKey : MainConfigKeys.getKeys(false)) {
- ConfigurationSection innerConfigKeys = customConfig.getConfigurationSection("Gui_Templets." + mainKey);
- if (innerConfigKeys != null)
- for (String innerChildrenKeys : innerConfigKeys.getKeys(false)) {
- if (!innerChildrenKeys.equals("Menu_Size") && !innerChildrenKeys.equals("Menu_Title") && !innerChildrenKeys.equals("FillSpace")) {
- int MenuGuiSize = this.customConfig.getInt("Gui_Templets." + mainKey + "." + "Menu_Size");
- String MenuGuiTitle = this.customConfig.getString("Gui_Templets." + mainKey + "." + "Menu_Title");
- String MenuFillSpace = this.customConfig.getString("Gui_Templets." + mainKey + "." + "FillSpace");
- int MenuMaxAmountOfItems = this.customConfig.getInt("Gui_Templets." + mainKey + "." + "Max_Amount_Of_Items");
- String playlistDisplayname = this.customConfig.getString("Gui_Templets." + mainKey + "." + innerChildrenKeys + ".Display_name");
- String playlistslot = this.customConfig.getString("Gui_Templets." + mainKey + "." + innerChildrenKeys + ".Slot");
- String playlistIcon = this.customConfig.getString("Gui_Templets." + mainKey + "." + innerChildrenKeys + ".Icon");
- boolean glow = this.customConfig.getBoolean("Gui_Templets." + mainKey + "." + innerChildrenKeys + ".Enchant");
- List<String> playlistLore = this.customConfig.getStringList("Gui_Templets." + mainKey + "." + innerChildrenKeys + ".Lore");
- yamlData.put(mainKey + "_" + innerChildrenKeys, Guidata.of(glow, playlistDisplayname, playlistslot, playlistIcon, playlistLore));
- yamlData.put(mainKey, Guidata.of(MenuGuiTitle, MenuGuiSize, "", "", "", new ArrayList<>(), MenuFillSpace, MenuMaxAmountOfItems));
- if (!yamlData.isEmpty()) {
- setDataYamlfile(mainKey, yamlData);
- }
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement