MessageChannel API for plugin messaging channels

Download via Github:

MessageChannel aims to add a common code base to interact with the plugin message channel. I created this utility for ease of life when I found myself writing a system that required interaction between a Spigot server and Bungeecord. Typically, the respective implementations wouldn’t be a problem to work with; however, I found it rather annoying to keep up with the ways in which each implementation had to be interacted with.

All interactions with MessageChannel will flow through your registered Pipeline, but you need to register your Pipeline before you can use it.

  1. First, you get an instance of the PipelineRegistry.
PipelineRegistry registry = MessageChannelAPI.getPipelineRegistry();
  1. Once you’ve gotten an instance of the PipelineRegistry, you need to register your pipeline with your specified channel.
Pipeline pipeline =  registry.register("YOUR CHANNEL HERE");
  1. Now that you’ve gotten your Pipeline registered, it is time to learn how to send information using it.
/* First, you have to craft your message */
PipelineMessage message = new PipelineMessage();

/* Now we right our data */

/* All that is left to do is send the packet. The first argument is the UUID of the player you want to send the information to */
pipeline.send(uuid, message);
  1. Sweet, we’ve learned how to register our Pipeline and send packets using it. Now, we learn how to listen using our Pipeline.
/* It is really as simple as calling pipeline#addListener() */
pipeline.addListener((target, packet) -> {
	String name =;
	boolean awesome =;

	System.out.println(name + " - " + awesome);

	/* Output: Crypnotic - true */

# MessageChannel is hosted on Maven Central #


If you like what I’m doing and would like to buy me dinner, any donation would be greatly appreciated. <3

1 Like

perhaps make this slightly more velocity related and less spigot/bungee. Alternatively you could just remove it from a method and leave it as just a code snippet.

Can this be used to broadcast when a server starts/stops on the rest of the network?