public interface LoadConfiguration
Modifier and Type | Method and Description |
---|---|
void |
initConfig(ArrangedPropertiesWriter config)
Initialize the needed config keys and values for this plugin.
|
boolean |
loadConfig(ArrangedPropertiesWriter config,
boolean slowMode)
Load the configuration of this plugin and prepare everything to make sure, that this plugin can be activated.
|
void |
setListModes(BitSet listOptions)
Set wanted clientlist arguments for this plugin.
|
void initConfig(ArrangedPropertiesWriter config)
HandleBotEvents.initClass(JTS3ServerMod_Interface, de.stefan1200.jts3serverquery.JTS3ServerQuery, String)
for this. This is not the right place to load the current configuration or other stuff!config.addKey(configPrefix + "_time", "After how many minutes all clients should be kicked?", "5");
if (modClass.getMySQLConnection() == null) config.addKey(configPrefix + "_file", "Path to file which contains the Auto Kick Timer message.", "%apphome%config/server1/autokicktimermessages.cfg");
config
- The ArrangedPropertiesWriter instance used from the current virtual bot instance.boolean loadConfig(ArrangedPropertiesWriter config, boolean slowMode) throws BotConfigurationException, NumberFormatException
config.getValue(configPrefix + "_time");
config
- The ArrangedPropertiesWriter instance used from the current virtual bot instance.slowMode
- If set to true
, you can decide what can be done without banning the bot (query_ip_whitelist.txt entry is missing).true
if the configuration was loaded successfully and the plugin is ready to be activated. false
if not.BotConfigurationException
- Use this exception, if something was set wrong in the configuration by the user.NumberFormatException
- Use this exception, if a number is not a number. :)void setListModes(BitSet listOptions)
listOptions.set(JTS3ServerMod_Interface.LIST_TIMES);
listOptions
- A BitSet containing the wanted clientlist flags.JTS3ServerMod_Interface.LIST_AWAY
,
JTS3ServerMod_Interface.LIST_COUNTRY
,
JTS3ServerMod_Interface.LIST_GROUPS
,
JTS3ServerMod_Interface.LIST_INFO
,
JTS3ServerMod_Interface.LIST_IP
,
JTS3ServerMod_Interface.LIST_TIMES
,
JTS3ServerMod_Interface.LIST_UID
,
JTS3ServerMod_Interface.LIST_VOICE