Class TemplateConfig

    • Constructor Detail

      • TemplateConfig

        public TemplateConfig​(File templateFolder)
      • TemplateConfig

        public TemplateConfig​(BetterGUI plugin)
    • Method Detail

      • setup

        public void setup()
        Set up the list
      • getValues

        public Map<String,​Object> getValues​(Map<String,​Object> settingMap,
                                                  List<String> ignoreKeys)
        Get the values of a template with the given setting map. The setting map includes the template name and the variables.
        Parameters:
        settingMap - the setting map
        ignoreKeys - the keys to ignore when getting the values
        Returns:
        the values
      • getValues

        public Map<String,​Object> getValues​(Map<String,​Object> settingMap,
                                                  String... ignoreKeys)
        Get the values of a template with the given setting map. The setting map includes the template name and the variables.
        Parameters:
        settingMap - the setting map
        ignoreKeys - the keys to ignore when getting the values
        Returns:
        the values
      • clear

        public void clear()
        Clear the list
      • get

        public Optional<Map<String,​Object>> get​(String name)
        Get the config values of a template
        Parameters:
        name - the name of the template
        Returns:
        the values as map
      • getAllTemplateNames

        public Collection<String> getAllTemplateNames()
        Get the names of all registered templates
        Returns:
        the names
      • disable

        public void disable()
        Specified by:
        disable in interface Loadable