Search code examples
velocitybungeecordspigot

How can I use BungeeCord Message Channel on Velocity?


I try to use the BungeeCord Message Channel on Velocity.

I know this work. Here is my code:

player.sendMessage("§aWait...");
ByteArrayDataOutput out = ByteStreams.newDataOutput();
out.writeUTF("Connect");
out.writeUTF("Lobby2");

player.sendPluginMessage(plugin, "BungeeCord", out.toByteArray());

This code works, if I use BungeeCord as my proxy. But not if I use Velocity.


Solution

  • Since more recent Minecraft versions, it is recommended to use the bungeecord:main channel (though Velocity should support both just fine).

    Also, it is important to make sure that you use a Velocity version newer than v1.1.0 (as seen here).

    Another thing, though it should not be necessary (and probably won't change anything for this issue), it's recommended to also enable velocity-support.

    If you remain having this issue, it might be best to create an issue on the Velocity Github repository, so they may be able to help you further!