-
Notifications
You must be signed in to change notification settings - Fork 49
3. Module
SimpleCloud provides a module system that can be used to make your network ready for multi-proxy. Modules can communicate with all services. They are always active when the manager is running.
First, you need a class that implements ICloudModule
It can look like this:
public class MyCloudModule implements ICloudModule {
@Override
public boolean isReloadable() {
return true;
}
@Override
public void onDisable() {
}
@Override
public void onEnable() {
}
}
It is recommended to change isReloadable to true to be able to reload the module.
Now you need a module.json. It can look like this:
{
"name": "SimpleCloud-Notify",
"author": "Fllip",
"mainClass": "eu.thesimplecloud.module.notify.NotifyModule",
"moduleCopyType": "NONE",
"repositories": [],
"dependencies": [],
"depend": [],
"softDepend": []
}
The moduleCopyType can be NONE, ALL, PROXY, SERVER, LOBBY.
This setting is used to copy the module as a plugin to services. This is useful for example a permission system. Of course, it shall be copied to all services to manage permissions there. The moduleCopyType would be ALL
If you just want to have your module on one service group you can add it to the template of this group.
edit template <name> module add <module>