Package me.hsgamer.bettergui.config
Class TemplateConfig
- java.lang.Object
-
- me.hsgamer.bettergui.config.TemplateConfig
-
public class TemplateConfig extends Object
The list of template configurations
-
-
Constructor Summary
Constructors Constructor Description TemplateConfig(File templateFolder)TemplateConfig(org.bukkit.plugin.Plugin plugin)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclear()Clear the listOptional<Map<String,Object>>get(String name)Get the config values of a templateCollection<String>getAllTemplateNames()Get the names of all registered templatesMap<String,Object>getValues(Map<String,Object> settingMap, String... ignoreKeys)Get the values of a template with the given setting map.Map<String,Object>getValues(Map<String,Object> settingMap, List<String> ignoreKeys)Get the values of a template with the given setting map.voidsetIncludeMenuInTemplate(boolean includeMenuInTemplate)Should the menu name be included in the template name?voidsetup()Set up the list
-
-
-
Constructor Detail
-
TemplateConfig
public TemplateConfig(File templateFolder)
-
TemplateConfig
public TemplateConfig(org.bukkit.plugin.Plugin plugin)
-
-
Method Detail
-
setIncludeMenuInTemplate
public void setIncludeMenuInTemplate(boolean includeMenuInTemplate)
Should the menu name be included in the template name?- Parameters:
includeMenuInTemplate- true if the menu name should be included
-
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 mapignoreKeys- 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 mapignoreKeys- 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
-
-