BungeeMessagingAPI ◆ 1.7-1.11 1.0.0

Provides you a simple way to communicate with bungee-cord

  1. PYRRH4
    Tested Minecraft Versions:
    • 1.7
    • 1.8
    • 1.9
    • 1.10
    • 1.11
    • 1.12
    What is it ?

    BungeeMessagingAPI is a simple way to communicate with bungee-cord (classic channels and simplier Forward channel).

    How to use it ?

    First, remember to refer to this guide to know about the classic bungee channels and arguments.
    You can get the code to include it in your plugin in the downloaded file.

    Registering the API

    Code (Text):
    Plugin plugin = // your plugin instance
    BungeeMessagingAPI api = new BungeeMessagingAPI(plugin);
    Unregistering the API
    Code (Text):
    api.terminate();
    Sending a message
    Code (Text):
    api.createBungeeOutMessage("Connect", "Notch", "server").send();
    Code (Text):
    api.createBungeeOutForwardMessage("MyCustomChannel", "MyCustomArg1", "MyCustomArg2").send();
    Creating a listener to listen to messages
    Code (Text):
    api.registerListener(new MyListener());
    Code (Text):
    public class MyListener implements BungeeMessagingListener
    {
        @Override
        public void onBungeeMessage(BungeeInMessage message) {}

        @Override
        public void onForwardMessage(BungeeInForwardMessage message) {}
    }
    BungeeInMessage contains the channel and the arguments (responses).
    BungeeInForwardMessage contains the custom channel and the custom arguments.