Skip to content
This repository was archived by the owner on May 9, 2021. It is now read-only.

Developer | Platform integration

Fridious edited this page Jan 4, 2019 · 7 revisions

DKBans has a simple way to integrate this plugin to any platform. DKBans is already integrated in to Bukkut and BungeeCord.

Index


Runtime platform integration

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:


PlayerManager integration (For your platform)

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.


Network integration (For your platform)

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.


Start DKBans on your platform

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();

Clone this wiki locally