Package me.hsgamer.bettergui.config
Class TemplateConfig
- java.lang.Object
-
- me.hsgamer.bettergui.config.TemplateConfig
-
- All Implemented Interfaces:
Loadable
,PostEnable
public class TemplateConfig extends Object implements Loadable, PostEnable
The list of template configurations
-
-
Constructor Summary
Constructors Constructor Description TemplateConfig(File templateFolder)
TemplateConfig(BetterGUI plugin)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Clear the listvoid
disable()
Optional<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.void
postEnable()
void
setup()
Set up the list
-
-
-
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 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
-
postEnable
public void postEnable()
- Specified by:
postEnable
in interfacePostEnable
-
-