API
- get<T>(key) - Returns the value or
undefined. Use a type parameter for TypeScript:get<boolean>('enabled'). - set(key, value) - Stores the value. Must be JSON-serializable (primitives, plain objects, arrays). No functions or circular refs.
- delete(key) - Removes the key. Returns
trueif the key existed. - has(key) - Returns whether the key exists.
- getAll() - Returns a snapshot of all key-value pairs.
- clear() - Removes all keys for this plugin.
Example: per-plugin settings
Example: opponent history (object)
id. Other plugins cannot read or write your storage.