[This is preliminary documentation and is subject to change.]
Sets value of a given config key.
Note that this method may throw exceptions if the given value is not acceptable.
Use Config.TrySetValue() if you'd like to suppress exceptions in favor of a boolean return value.
Namespace: fCraftAssembly: fCraft (in fCraft.dll) Version: 0.6.2.4 (0.6.2.4)
Syntax
Parameters
- key
- ConfigKey
Config key to set.
- rawValue
- Object
Value to assign to the key. If passed object is not a string, rawValue.ToString() is used.
Return Value
True if value is valid and has been assigned. False if value is valid, but assignment was cancelled by an event handler/plugin.Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type ConfigKey. When you use instance method syntax to call this method, omit the first parameter.
Exceptions
| Exception | Condition |
|---|---|
| System..::..ArgumentNullException | |
| System..::..FormatException |