Class Config
java.lang.Object
me.confuser.banmanager.common.configs.Config
- Direct Known Subclasses:
ConsoleConfig,DefaultConfig,ExemptionsConfig,GeoIpConfig,MessagesConfig,ReasonsConfig,SchedulesConfig,WebhookConfig
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConfig(File dataFolder, File file, CommonLogger logger) Config(File dataFolder, String fileName, CommonLogger logger) -
Method Summary
-
Field Details
-
conf
-
file
-
dataFolder
-
logger
-
-
Constructor Details
-
Config
-
Config
-
-
Method Details
-
setFile
Must be called before using config.load() or config.save();- Parameters:
input-- Returns:
- (Config) instance
-
load
public boolean load()Lazy load- Returns:
- true if the config was loaded successfully, false otherwise
-
afterLoad
public abstract void afterLoad() -
onSave
public abstract void onSave() -
onLoad
Load configuration from file- Parameters:
file- the file to load- Returns:
- true if the config was loaded successfully, false otherwise
- Throws:
Exception- if the file does not exist
-
save
public void save()
-