Interface PluginConfig
- All Known Implementing Classes:
PluginConfigImpl, RPPluginConfig
This class interface contains four different variations of get and set parameter methods:
- getCore
<type>Parameter - getUnsafe
<type>Parameter - getPlugin
<type>Parameter
Attempting to set or get parameters not mentioned here should raise an error. The "Unsafe" set of methods allow you to modify configuration settings which are stored directly inside the client. These settings may change (without warning) between versions, so there is no guarantee that plugins that use these values will behave properly in different versions of the client. The "Plugin" set of methods are used to store and retrieve data intended exclusively for the use of the plugin itself which is what you will be using most of the time.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final StringDeprecated.2.0.0.1 (removed from core)static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringDeprecated.static final Stringstatic final StringDeprecated.static final StringDeprecated.static final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringSemicolon seperated list containing: IP
NetworkInterfacename (ex.static final String -
Method Summary
Modifier and TypeMethodDescriptionvoidEnable the plugin to store configuration parameters into a separate external configuration file.booleanReturns the value of a core boolean parameter.byte[]Returns the value of a core byte array parameter.int[]Returns the value of a core color parameter.floatReturns the value of a core float parameter.intReturns the value of a core int parameter.longReturns the value of a core long parameter.Returns the value of a core string parameter.getParameter(String key) booleanReturns the value of a plugin boolean parameter.booleangetPluginBooleanParameter(String key, boolean default_value) Returns the value of a plugin boolean parameter.byte[]Returns the value of a plugin byte array parameter.byte[]getPluginByteParameter(String key, byte[] default_value) Returns the value of a plugin byte array parameter.int[]Returns the value of a plugin color parameter.int[]getPluginColorParameter(String key, int[] default_value) Returns the value of a plugin color parameter.Returns the PluginConfigSource object used for this plugin configuration (or null if an external configuration object isn't used).floatReturns the value of a plugin float parameter.floatgetPluginFloatParameter(String key, float default_value) Returns the value of a plugin float parameter.intReturns the value of a plugin int parameter.intgetPluginIntParameter(String key, int default_value) Returns the value of a plugin int parameter.getPluginListParameter(String key, List default_value) Returns the value of a plugin list parameter.longReturns the value of a plugin long parameter.longgetPluginLongParameter(String key, long default_value) Returns the value of a plugin long parameter.getPluginMapParameter(String key, Map default_value) Returns the value of a plugin map parameter.getPluginParameter(String key) String[]Returns the value of a plugin string-list parameter.Returns the value of a plugin string parameter.getPluginStringParameter(String key, String default_value) Returns the value of a plugin string parameter.getPluginUserFile(String name) Returns a file that can be used by the plugin to save user-specific state.booleanReturns the value of a core boolean parameter.booleangetUnsafeBooleanParameter(String key, boolean default_value) Returns the value of a core boolean parameter.byte[]Returns the value of a core byte array parameter.byte[]getUnsafeByteParameter(String key, byte[] default_value) Returns the value of a core byte array parameter.int[]Returns the value of a core color parameter.int[]getUnsafeColorParameter(String key, int[] default_value) Returns the value of a core color parameter.floatReturns the value of a core float parameter.floatgetUnsafeFloatParameter(String key, float default_value) Returns the value of a core float parameter.intReturns the value of a core int parameter.intgetUnsafeIntParameter(String key, int default_value) Returns the value of a core int parameter.longReturns the value of a core long parameter.longgetUnsafeLongParameter(String key, long default_value) Returns the value of a core long parameter.Returns a mapinvalid input: '<'String,Object> giving parameter names -> parameter values.Returns the value of a core string parameter.getUnsafeStringParameter(String key, String default_value) Returns the value of a core string parameter.booleanhasParameter(String param_name) Returns true if a core parameter with the given name exists.booleanhasPluginParameter(String param_name) Returns true if a plugin parameter with the given name exists.booleanvoidbooleanRemoves the plugin color parameter with the given name.booleanRemoves the plugin parameter with the given name.voidsave()make sure you save it after making changes!voidsetCoreBooleanParameter(String key, boolean value) Sets the value of a core boolean parameter.voidsetCoreByteParameter(String key, byte[] value) Sets the value of a core byte array parameter.voidsetCoreColorParameter(String key, int[] value) Sets the value of a core byte array parameter.voidsetCoreColorParameter(String key, int[] value, boolean override) Sets the value of a core byte array parameter.voidsetCoreFloatParameter(String key, float value) Sets the value of a core float parameter.voidsetCoreIntParameter(String key, int value) Sets the value of a core int parameter.voidsetCoreLongParameter(String key, long value) Sets the value of a core long parameter.voidsetCoreStringParameter(String key, String value) Sets the value of a core string parameter.voidsetPluginColorParameter(String key, int[] value) Sets the value of a plugin color parameter.voidsetPluginColorParameter(String key, int[] value, boolean override) Sets the value of a plugin color parameter.voidvoidSets the plugin configuration source object to use for storing parameters for this plugin config object.voidsetPluginListParameter(String key, List value) Sets the value of a plugin list parameter.voidsetPluginMapParameter(String key, Map value) Sets the value of a plugin map parameter.voidsetPluginParameter(String key, boolean value) Sets the value of a plugin boolean parameter.voidsetPluginParameter(String key, byte[] value) Sets the value of a plugin byte array parameter.voidsetPluginParameter(String key, float value) Sets the value of a plugin float parameter.voidsetPluginParameter(String key, int value) Sets the value of a plugin int parameter.voidsetPluginParameter(String key, int value, boolean global) Sets the value of a plugin int parameter.voidsetPluginParameter(String key, long value) Sets the value of a plugin long parameter.voidsetPluginParameter(String key, String value) Sets the value of a plugin string parameter.voidsetPluginStringListParameter(String key, String[] value) Sets the value of a plugin string-list parameter.voidsetUnsafeBooleanParameter(String key, boolean value) Sets the value of a core boolean parameter.voidsetUnsafeByteParameter(String key, byte[] value) Sets the value of a core byte array parameter.voidsetUnsafeColorParameter(String key, int[] value) Returns the value of a core color parameter.voidsetUnsafeColorParameter(String key, int[] value, boolean override) Returns the value of a core color parameter.voidsetUnsafeFloatParameter(String key, float value) Sets the value of a core float parameter.voidsetUnsafeIntParameter(String key, int value) Sets the value of a core int parameter.voidsetUnsafeLongParameter(String key, long value) Sets the value of a core long parameter.voidsetUnsafeStringParameter(String key, String value) Sets the value of a core string parameter.
-
Field Details
-
CORE_PARAM_LONG_MAX_UPLOAD_SPEED_KBYTES_PER_SEC
- See Also:
-
CORE_PARAM_LONG_MAX_UPLOAD_SPEED_SEEDING_KBYTES_PER_SEC
- See Also:
-
CORE_PARAM_LONG_MAX_DOWNLOAD_SPEED_KBYTES_PER_SEC
- See Also:
-
CORE_PARAM_INT_MAX_UPLOAD_SPEED_KBYTES_PER_SEC
Deprecated.- See Also:
-
CORE_PARAM_INT_MAX_UPLOAD_SPEED_SEEDING_KBYTES_PER_SEC
Deprecated.- See Also:
-
CORE_PARAM_INT_MAX_DOWNLOAD_SPEED_KBYTES_PER_SEC
Deprecated.- See Also:
-
CORE_PARAM_INT_MAX_CONNECTIONS_PER_TORRENT
- See Also:
-
CORE_PARAM_INT_MAX_CONNECTIONS_GLOBAL
- See Also:
-
CORE_PARAM_INT_MAX_DOWNLOADS
- See Also:
-
CORE_PARAM_INT_MAX_ACTIVE
- See Also:
-
CORE_PARAM_INT_MAX_ACTIVE_SEEDING
- See Also:
-
CORE_PARAM_INT_MAX_UPLOADS
- See Also:
-
CORE_PARAM_INT_MAX_UPLOADS_SEEDING
- See Also:
-
CORE_PARAM_BOOLEAN_AUTO_SPEED_ON
- See Also:
-
CORE_PARAM_BOOLEAN_AUTO_SPEED_SEEDING_ON
- See Also:
-
CORE_PARAM_BOOLEAN_MAX_UPLOAD_SPEED_SEEDING
- See Also:
-
CORE_PARAM_BOOLEAN_MAX_ACTIVE_SEEDING
- See Also:
-
CORE_PARAM_BOOLEAN_SOCKS_PROXY_NO_INWARD_CONNECTION
- See Also:
-
CORE_PARAM_BOOLEAN_NEW_SEEDS_START_AT_TOP
- See Also:
-
CORE_PARAM_STRING_LOCAL_BIND_IP
Semicolon seperated list containing: IP
NetworkInterfacename (ex. eth10)
NetworkInterface name with IP index in square brackets (ex. eth6[0])- Since:
- 2.3.0.5
- See Also:
-
CORE_PARAM_BOOLEAN_FRIENDLY_HASH_CHECKING
Deprecated.2.0.0.1 (removed from core)- See Also:
-
GUI_PARAM_INT_SWT_REFRESH_IN_MS
- Since:
- 3.0.4.3
- See Also:
-
CORE_PARAM_BOOLEAN_NEW_TORRENTS_START_AS_STOPPED
- Since:
- 3.0.4.3
- See Also:
-
CORE_PARAM_INT_INCOMING_TCP_PORT
- Since:
- 3.0.5.3
- See Also:
-
CORE_PARAM_INT_INCOMING_UDP_PORT
- Since:
- 3.0.5.3
- See Also:
-
CORE_PARAM_STRING_DEFAULT_SAVE_PATH
- Since:
- 3.1.1.1
- See Also:
-
-
Method Details
-
getCoreBooleanParameter
Returns the value of a core boolean parameter.- Parameters:
key- The parameter name.- Returns:
- The value of the parameter.
- Since:
- 3.0.4.3
-
getCoreByteParameter
Returns the value of a core byte array parameter.- Parameters:
key- The parameter name.- Returns:
- The value of the parameter.
- Since:
- 3.0.4.3
-
getCoreColorParameter
Returns the value of a core color parameter.It will return null if no color parameter is stored, or an integer array of size 4 representing the red, green and blue values, and a flag indicating if the color is an override of the default or not (0 indicates no override, 1 means it is overridden).
In many cases, the override flag can just be ignored.
- Parameters:
key- The parameter name.- Returns:
- The value of the parameter.
- Since:
- 3.0.5.3
-
getCoreFloatParameter
Returns the value of a core float parameter.- Parameters:
key- The parameter name.- Returns:
- The value of the parameter.
- Since:
- 3.0.4.3
-
getCoreIntParameter
Returns the value of a core int parameter.- Parameters:
key- The parameter name.- Returns:
- The value of the parameter.
- Since:
- 3.0.4.3
-
getCoreLongParameter
Returns the value of a core long parameter.- Parameters:
key- The parameter name.- Returns:
- The value of the parameter.
- Since:
- 3.0.4.3
-
getCoreStringParameter
-
setCoreBooleanParameter
Sets the value of a core boolean parameter.- Parameters:
key- The parameter name, which must be one defined from the above core constants.value- The new value for the parameter.- Since:
- 3.0.4.2
-
setCoreByteParameter
Sets the value of a core byte array parameter.- Parameters:
key- The parameter name, which must be one defined from the above core constants.value- The new value for the parameter.- Since:
- 3.0.4.2
-
setCoreColorParameter
Sets the value of a core byte array parameter.The value should be an integer array of size 3 representing the red, green and blue values - or null to disable it.
- Parameters:
key- The parameter name, which must be one defined from the above core constants.value- The new value for the parameter.- Since:
- 3.0.5.3
-
setCoreColorParameter
Sets the value of a core byte array parameter.The value should be an integer array of size 3 representing the red, green and blue values - or null to disable it.
The override flag is used to indicate if the value being set is overriding the default value. This is mainly used for interface purposes.
- Parameters:
key- The parameter name, which must be one defined from the above core constants.value- The new value for the parameter.override- true if the value is overridden from the default.- Since:
- 3.0.5.3
-
setCoreFloatParameter
Sets the value of a core float parameter.- Parameters:
key- The parameter name, which must be one defined from the above core constants.value- The new value for the parameter.- Since:
- 3.0.4.2
-
setCoreIntParameter
Sets the value of a core int parameter.- Parameters:
key- The parameter name, which must be one defined from the above core constants.value- The new value for the parameter.- Since:
- 3.0.4.2
-
setCoreLongParameter
Sets the value of a core long parameter.- Parameters:
key- The parameter name, which must be one defined from the above core constants.value- The new value for the parameter.- Since:
- 3.0.4.2
-
setCoreStringParameter
-
getPluginBooleanParameter
Returns the value of a plugin boolean parameter.- Parameters:
key- The parameter name.- Returns:
- The value of the parameter.
- Since:
- 2.0.4.2
-
getPluginBooleanParameter
Returns the value of a plugin boolean parameter.- Parameters:
key- The parameter name.default_value- The default value to return if one is not defined.- Returns:
- The value of the parameter.
- Since:
- 2.0.4.2
-
getPluginByteParameter
Returns the value of a plugin byte array parameter.- Parameters:
key- The parameter name.- Returns:
- The value of the parameter.
- Since:
- 3.0.0.7
-
getPluginByteParameter
Returns the value of a plugin byte array parameter.- Parameters:
key- The parameter name.default_value- The default value to return if one is not defined.- Returns:
- The value of the parameter.
- Since:
- 2.2.0.3
-
getPluginColorParameter
Returns the value of a plugin color parameter.It will return null if no color parameter is stored, or an integer array of size 4 representing the red, green and blue values, and a flag indicating if the color is an override of the default or not (0 indicates no override, 1 means it is overridden).
In many cases, the override flag can just be ignored.
- Parameters:
key- The parameter name.- Returns:
- The value of the parameter.
- Since:
- 3.0.5.3
-
getPluginColorParameter
Returns the value of a plugin color parameter.It will return null if no color parameter is stored, or an integer array of size 4 representing the red, green and blue values, and a flag indicating if the color is an override of the default or not (0 indicates no override, 1 means it is overridden).
In many cases, the override flag can just be ignored.
- Parameters:
key- The parameter name.default_value- The default value to return if one is not defined.- Returns:
- The value of the parameter.
- Since:
- 3.0.5.3
-
getPluginFloatParameter
Returns the value of a plugin float parameter.- Parameters:
key- The parameter name.- Returns:
- The value of the parameter.
- Since:
- 3.0.0.7
-
getPluginFloatParameter
Returns the value of a plugin float parameter.- Parameters:
key- The parameter name.default_value- The default value to return if one is not defined.- Returns:
- The value of the parameter.
- Since:
- 3.0.0.7
-
getPluginIntParameter
Returns the value of a plugin int parameter.- Parameters:
key- The parameter name.- Returns:
- The value of the parameter.
- Since:
- 2.0.4.2
-
getPluginIntParameter
Returns the value of a plugin int parameter.- Parameters:
key- The parameter name.default_value- The default value to return if one is not defined.- Returns:
- The value of the parameter.
- Since:
- 2.0.4.2
-
getPluginListParameter
Returns the value of a plugin list parameter. The contents of the list must conform to bencodable rules (e.g. Map, Long, byte[], List)- Parameters:
key- The parameter name.default_value- The default value to return if one is not defined.- Returns:
- The value of the parameter.
- Since:
- 2.3.0.1
-
getPluginLongParameter
Returns the value of a plugin long parameter.- Parameters:
key- The parameter name.- Returns:
- The value of the parameter.
- Since:
- 3.0.0.7
-
getPluginLongParameter
Returns the value of a plugin long parameter.- Parameters:
key- The parameter name.default_value- The default value to return if one is not defined.- Returns:
- The value of the parameter.
- Since:
- 3.0.0.7
-
getPluginMapParameter
Returns the value of a plugin map parameter. The contents of the map must conform to bencodable rules (e.g. Map, Long, byte[], List)- Parameters:
key- The parameter name.default_value- The default value to return if one is not defined.- Returns:
- The value of the parameter.
- Since:
- 2.3.0.1
-
getPluginStringParameter
-
getPluginStringParameter
-
getPluginStringListParameter
-
setPluginParameter
Sets the value of a plugin boolean parameter.- Parameters:
key- The parameter name.value- The new value for the parameter.- Since:
- 2.0.4.2
-
setPluginParameter
Sets the value of a plugin byte array parameter.- Parameters:
key- The parameter name.value- The new value for the parameter.- Since:
- 2.1.0.2
-
setPluginParameter
Sets the value of a plugin float parameter.- Parameters:
key- The parameter name.value- The new value for the parameter.- Since:
- 3.0.0.7
-
setPluginParameter
Sets the value of a plugin int parameter.- Parameters:
key- The parameter name.value- The new value for the parameter.- Since:
- 2.0.4.2
-
setPluginParameter
Sets the value of a plugin int parameter.- Parameters:
key- The parameter name.value- The new value for the parameter.global- Whether or not this parameter should be made externally accessible.- Since:
- 2.5.0.1
-
setPluginParameter
Sets the value of a plugin long parameter.- Parameters:
key- The parameter name.value- The new value for the parameter.- Since:
- 3.0.0.7
-
setPluginParameter
-
setPluginStringListParameter
-
setPluginColorParameter
Sets the value of a plugin color parameter.The value should be an integer array of size 3 representing the red, green and blue values - or null to disable it.
- Parameters:
key- The parameter name.value- The new value for the parameter.- Since:
- 3.0.5.3
-
setPluginColorParameter
Sets the value of a plugin color parameter.The value should be an integer array of size 3 representing the red, green and blue values - or null to disable it.
The override flag is used to indicate if the value being set is overriding the default value. This is mainly used for interface purposes.
- Parameters:
key- The parameter name.value- The new value for the parameter.override- true if the value is overridden from the default.- Since:
- 3.0.5.3
-
setPluginListParameter
-
setPluginMapParameter
-
getUnsafeBooleanParameter
Returns the value of a core boolean parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.- Parameters:
key- The parameter name.default_value- The default value to return if one is not defined.- Returns:
- The value of the parameter.
- Since:
- 3.0.0.7
-
getUnsafeBooleanParameter
Returns the value of a core boolean parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.- Parameters:
key- The parameter name.default_value- The default value to return if one is not defined.- Returns:
- The value of the parameter.
- Since:
- 3.0.0.5
-
getUnsafeByteParameter
Returns the value of a core byte array parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.- Parameters:
key- The parameter name.- Returns:
- The value of the parameter.
- Since:
- 3.0.0.7
-
getUnsafeByteParameter
Returns the value of a core byte array parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.- Parameters:
key- The parameter name.default_value- The default value to return if one is not defined.- Returns:
- The value of the parameter.
- Since:
- 3.0.0.7
-
getUnsafeColorParameter
Returns the value of a core color parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.It will return null if no color parameter is stored, or an integer array of size 4 representing the red, green and blue values, and a flag indicating if the color is an override of the default or not (0 indicates no override, 1 means it is overridden).
In many cases, the override flag can just be ignored.
- Parameters:
key- The parameter name.- Returns:
- The value of the parameter.
- Since:
- 3.0.5.3
-
getUnsafeColorParameter
Returns the value of a core color parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.It will return null if no color parameter is stored, or an integer array of size 4 representing the red, green and blue values, and a flag indicating if the color is an override of the default or not (0 indicates no override, 1 means it is overridden).
In many cases, the override flag can just be ignored.
- Parameters:
key- The parameter name.default_value- The default value to return if one is not defined.- Returns:
- The value of the parameter.
- Since:
- 3.0.5.3
-
getUnsafeFloatParameter
Returns the value of a core float parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.- Parameters:
key- The parameter name.- Returns:
- The value of the parameter.
- Since:
- 3.0.0.7
-
getUnsafeFloatParameter
Returns the value of a core float parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.- Parameters:
key- The parameter name.default_value- The default value to return if one is not defined.- Returns:
- The value of the parameter.
- Since:
- 3.0.0.5
-
getUnsafeIntParameter
Returns the value of a core int parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.- Parameters:
key- The parameter name.- Returns:
- The value of the parameter.
- Since:
- 3.0.0.7
-
getUnsafeIntParameter
Returns the value of a core int parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.- Parameters:
key- The parameter name.default_value- The default value to return if one is not defined.- Returns:
- The value of the parameter.
- Since:
- 3.0.0.5
-
getUnsafeLongParameter
Returns the value of a core long parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.- Parameters:
key- The parameter name.- Returns:
- The value of the parameter.
- Since:
- 3.0.0.7
-
getUnsafeLongParameter
Returns the value of a core long parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.- Parameters:
key- The parameter name.default_value- The default value to return if one is not defined.- Returns:
- The value of the parameter.
- Since:
- 3.0.0.5
-
getUnsafeStringParameter
Returns the value of a core string parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.- Parameters:
key- The parameter name.- Returns:
- The value of the parameter.
- Since:
- 3.0.0.7
-
getUnsafeStringParameter
Returns the value of a core string parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.- Parameters:
key- The parameter name.default_value- The default value to return if one is not defined.- Returns:
- The value of the parameter.
- Since:
- 3.0.0.5
-
setUnsafeBooleanParameter
Sets the value of a core boolean parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.- Parameters:
key- The parameter name, which must be one defined from the above core constants.value- The new value for the parameter.- Since:
- 3.0.0.5
-
setUnsafeByteParameter
Sets the value of a core byte array parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.- Parameters:
key- The parameter name, which must be one defined from the above core constants.value- The new value for the parameter.- Since:
- 3.0.0.7
-
setUnsafeColorParameter
Returns the value of a core color parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.The value should be an integer array of size 3 representing the red, green and blue values - or null to disable it.
- Parameters:
key- The parameter name.value- The new value for the parameter.- Since:
- 3.0.5.3
-
setUnsafeColorParameter
Returns the value of a core color parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.The value should be an integer array of size 3 representing the red, green and blue values - or null to disable it.
The override flag is used to indicate if the value being set is overriding the default value. This is mainly used for interface purposes.
- Parameters:
key- The parameter name.value- The default value to return if one is not defined.override- true if the value is overridden from the default.- Since:
- 3.0.5.3
-
setUnsafeFloatParameter
Sets the value of a core float parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.- Parameters:
key- The parameter name, which must be one defined from the above core constants.value- The new value for the parameter.- Since:
- 3.0.0.5
-
setUnsafeIntParameter
Sets the value of a core int parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.- Parameters:
key- The parameter name, which must be one defined from the above core constants.value- The new value for the parameter.- Since:
- 3.0.0.5
-
setUnsafeLongParameter
Sets the value of a core long parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.- Parameters:
key- The parameter name, which must be one defined from the above core constants.value- The new value for the parameter.- Since:
- 3.0.0.5
-
setUnsafeStringParameter
Sets the value of a core string parameter. Note: the semantics of this method will not be guaranteed - core parameter names may change in the future, and this method will not do any parameter name mapping for you, so take care when using this method.- Parameters:
key- The parameter name, which must be one defined from the above core constants.value- The new value for the parameter.- Since:
- 3.0.0.5
-
removePluginParameter
Removes the plugin parameter with the given name.- Parameters:
key- Name of the parameter.- Returns:
- true if the parameter was found and removed.
-
removePluginColorParameter
Removes the plugin color parameter with the given name.- Parameters:
key- Name of the parameter.- Returns:
- true if the parameter was found and removed.
- Since:
- 3.0.5.3
-
getPluginConfigKeyPrefix
String getPluginConfigKeyPrefix()- Returns:
- the prefix used when storing configuration values in the config file for this plugin's config parameters
- Since:
- 2.1.0.0
-
getParameter
-
getPluginParameter
-
isNewInstall
boolean isNewInstall() -
getUnsafeParameterList
Map getUnsafeParameterList()Returns a mapinvalid input: '<'String,Object> giving parameter names -> parameter values. Value can be Long or String as the type is actually not known by the core (might fix one day). Therefore, float values are actually represented by their String format: boolean - Long 0 or 1 int - Long.intValue float - String value String - String Unsafe methods - existence/semantics of parameters not guaranteed to be maintained across versions If something changes and breaks your plugin, don't come complaining to me- Since:
- 2.5.0.3
-
save
make sure you save it after making changes!- Throws:
PluginException- Since:
- 2.0.8.0
-
getPluginUserFile
-
hasParameter
Returns true if a core parameter with the given name exists.- Parameters:
key- The name of the parameter to check.- Since:
- 2.5.0.2
-
hasPluginParameter
Returns true if a plugin parameter with the given name exists.- Parameters:
key- The name of the parameter to check.- Since:
- 2.5.0.2
-
addListener
-
removeListener
-
setPluginConfigKeyPrefix
- Parameters:
_key-- Since:
- 2.5.0.1
-
enableExternalConfigSource
PluginConfigSource enableExternalConfigSource()Enable the plugin to store configuration parameters into a separate external configuration file. Note: once this method is called, you need to invokePluginConfigSource.initialize()for the external configuration file to be properly integrated with the client.When a plugin is first initialised, it should call this method as soon as possible during the initialization stage. This then configures the PluginConfig object to store any parameter values into an external configuration file (rather than storing it directly with the main configuration file used by the client).
When this method is invoked, it will return an object which allows the filename to be chosen - it allows a limited amount of manipulation of the configuration file. This method only needs to be invoked once.
All methods which get and set plugin parameters on this object will store data in the external configuration file. The use of classes like
BasicPluginConfigModelwill automatically integrate parameters to the external configuration source.However, if you use any other mechanism to store parameter data, you may need to call the
to integrate the parameter properly.invalid reference
registerParameter- Returns:
- The PluginConfigSource object representing the external configuration file.
- Since:
- 3.0.5.3
-
getPluginConfigSource
PluginConfigSource getPluginConfigSource()Returns the PluginConfigSource object used for this plugin configuration (or null if an external configuration object isn't used).- Returns:
- The PluginConfigSource object.
- Since:
- 3.0.5.3
-
setPluginConfigSource
Sets the plugin configuration source object to use for storing parameters for this plugin config object.This method should only be used as an alternative to
enableExternalConfigSource(). You will only need to use this method if you use thegetLocalPluginInterfacemethod to store data in a separate namespace, but want to use the same configuration file to store data in.- Parameters:
source- The PluginConfigSource object to use.- Since:
- 3.0.5.3
-