Register a channel?

Discussion in 'BungeeCord Discussion' started by Suraski, May 29, 2013.

  1. I'm attempting to write a plugin that when a command is ran, it broadcasts something across the bungee servers within a config. Well I have everything done correctly and working, except for this error that pops up each time I go to send the plugin message. I've done it following a few tutorials on how the bungee API works and alas no luck...


    Code (Text):

    20:06:35 [SEVERE] null
    org.bukkit.command.CommandException: Unhandled exception executing command 'test' in plugin BungeeBroadcast v1.0.0
            at org.bukkit.command.PluginCommand.execute(
            at org.bukkit.command.SimpleCommandMap.dispatch(
            at org.bukkit.craftbukkit.v1_5_R3.CraftServer.dispatchCommand(
            at net.minecraft.server.v1_5_R3.PlayerConnection.handleCommand(
            at net.minecraft.server.v1_5_R3.PlayerConnection.a(
            at net.minecraft.server.v1_5_R3.Packet3Chat.handle(
            at org.spigotmc.netty.NettyNetworkManager.b(
            at net.minecraft.server.v1_5_R3.PlayerConnection.d(
            at net.minecraft.server.v1_5_R3.ServerConnection.b(SourceFile:35)
            at org.spigotmc.MultiplexingServerConnection.b(
            at net.minecraft.server.v1_5_R3.MinecraftServer.r(
            at net.minecraft.server.v1_5_R3.DedicatedServer.r(
            at net.minecraft.server.v1_5_R3.MinecraftServer.q(
    Caused by: org.bukkit.plugin.messaging.ChannelNotRegisteredException: Attempted to send a plugin message through an unregistered channel ('BungeeCord'.
            at org.bukkit.plugin.messaging.StandardMessenger.validatePluginMessage(
            at org.bukkit.craftbukkit.v1_5_R3.entity.CraftPlayer.sendPluginMessage(
            at com.robbyduke.plugins.bungee.broadcast.Main.onCommand(
            at org.bukkit.command.PluginCommand.execute(
            ... 15 more
    #1 Suraski, May 29, 2013
    Last edited: May 29, 2013
  2. getServer().getMessenger().registerOutgoingPluginChannel(this, "BungeeCord");
    • Agree x 1
    • Winner x 1
    • Informative x 1
    • Friendly x 1
    • Useful x 1
  3. Oh, hello! Thanks! Works now :)
  4. Thanks still playing minecraft 7 years old ;0