Class ConfigEditor
java.lang.Object
com.bencodez.advancedcore.api.yml.editor.ConfigEditor
Configuration editor GUI handler.
-
Constructor Summary
ConstructorsConstructorDescriptionConfigEditor(AdvancedCorePlugin plugin, com.bencodez.simpleapi.file.YMLFile ymlFile) Instantiates a new config editor.ConfigEditor(AdvancedCorePlugin plugin, com.bencodez.simpleapi.file.YMLFile ymlFile, com.bencodez.simpleapi.file.YMLConfig ymlConfig, Class<?> ymlConfigClass) Instantiates a new config editor. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddButtons(com.bencodez.simpleapi.file.YMLConfig ymlConfig, Class<?> clazz, org.bukkit.configuration.ConfigurationSection config) Adds buttons from yml config.voidaddButtons(com.bencodez.simpleapi.file.YMLFile ymlFile, Class<?> clazz, org.bukkit.configuration.ConfigurationSection config) Adds buttons from yml file.voidload()Load configuration buttons.voidopen(org.bukkit.entity.Player player) Opens the config editor GUI.voidOpens the config editor GUI for a section.voidopenNonConfig(org.bukkit.entity.Player player) Opens the non-config section editor GUI.
-
Constructor Details
-
ConfigEditor
Instantiates a new config editor.- Parameters:
plugin- the pluginymlFile- the yml file
-
ConfigEditor
public ConfigEditor(AdvancedCorePlugin plugin, com.bencodez.simpleapi.file.YMLFile ymlFile, com.bencodez.simpleapi.file.YMLConfig ymlConfig, Class<?> ymlConfigClass) Instantiates a new config editor.- Parameters:
plugin- the pluginymlFile- the yml fileymlConfig- the yml configymlConfigClass- the yml config class
-
-
Method Details
-
addButtons
public void addButtons(com.bencodez.simpleapi.file.YMLConfig ymlConfig, Class<?> clazz, org.bukkit.configuration.ConfigurationSection config) Adds buttons from yml config.- Parameters:
ymlConfig- the yml configclazz- the classconfig- the configuration section
-
addButtons
public void addButtons(com.bencodez.simpleapi.file.YMLFile ymlFile, Class<?> clazz, org.bukkit.configuration.ConfigurationSection config) Adds buttons from yml file.- Parameters:
ymlFile- the yml fileclazz- the classconfig- the configuration section
-
load
public void load()Load configuration buttons. -
open
public void open(org.bukkit.entity.Player player) Opens the config editor GUI.- Parameters:
player- the player
-
open
Opens the config editor GUI for a section.- Parameters:
player- the playersec- the section path
-
openNonConfig
public void openNonConfig(org.bukkit.entity.Player player) Opens the non-config section editor GUI.- Parameters:
player- the player
-