-
Notifications
You must be signed in to change notification settings - Fork 7
Developer | Platform integration
DKBans has a simple way to integrate this plugin to any platform. DKBans is already integrated in to Bukkut and BungeeCord.
- Runtime platform integration
- PlayerManager integration (For your platform)
- Network integration (For your platform)
- Start DKBans on your platform
Every runtime must have an integration to work with this plugin, use the DKBansPlatform interface to create a new runtime integration. With this interface you can integrate the task manager and CommandManager for your platform. In this interface are also other necessary functions to run DKBans.
Do not forget to check, if the player is existing or is banned on login, see here an example to a DKBans listener.
Integrate this points in your platform listener:
- Check if the player exists on login, if he or his ip is banned (Create a player when he not exists and update all player information).
- Update player information on discconect.
- Check if the player is muted, when he is chatting, or this word is blocked.
- Check if a command is blocked, when a player is executing a command.
- Check tab completion.
We recommend also to integrate all events on your platform.
Example integrations:
Create a new online player integration for your platform, if you are using bungeecord or anotehr network software you have to integrate this in to your network software to synchronize all online players. The PlayerManager the player manager is an abstract object, you have only to integrate the online player and the player synchronising part.
The DKNetwork the interface is for integrating your platform or another network software to DKBans. This network is used for sending broadcasts or get information about the network.
If you have created all necessary integration classes you can start DKBans with:
new BanSystem(YourPlatform,YourNetwork,YourPlayerManager);
Use this for shutting down DKBans:
BanSystem.getInsatnce().shutdown();