27 lines
847 B
Markdown
27 lines
847 B
Markdown
|
# Common
|
||
|
|
||
|
In that readme will be stored several notes about working with common parts in all your modules
|
||
|
|
||
|
## ModuleLoader
|
||
|
|
||
|
This module has been created to allow your plugins to load dynamically after build of the server and client
|
||
|
|
||
|
### Server
|
||
|
|
||
|
To declare your module loader you should create **_class_** realization of `ServerModuleLoader` and put the classname of that
|
||
|
realization into the `modules` section as a string.
|
||
|
|
||
|
### Client
|
||
|
|
||
|
On the client side you also should create your own realization of `ModuleLoader`, but instead of some config you will
|
||
|
need to create some `private val` property on the top level in your `ModuleLoader` realization file. Example:
|
||
|
|
||
|
```kotlin
|
||
|
|
||
|
object SomeModuleLoader : ModuleLoader {
|
||
|
// body
|
||
|
}
|
||
|
|
||
|
private val someModuleLoaderProperty = AdditionalModules.addModule(SomeModuleLoader) // that is important part
|
||
|
```
|