ModuleStoreProvider

The ModuleStoreProvider is responsible for registering and returning the DataStore instances required by individual modules

Functions

Link copied to clipboard
abstract fun getModuleStore(module: Module): DataStore
abstract fun getModuleStore(moduleId: String): DataStore

Registers a Module for storage and returns its DataStore object, which can be used to read/write data.

Link copied to clipboard

Returns a DataStore that is not tied to a specific module, and therefore available for shared storage. Be mindful that this store can therefore be read from and written to by any code with access to it.