cpw.mods.fml.common.network

## Class FMLEventChannel

- java.lang.Object
- - cpw.mods.fml.common.network.FMLEventChannel

-     public class FMLEventChannel
      extends java.lang.Object

  An event driven network channel, using `FMLNetworkEvent.CustomPacketEvent` and `FMLNetworkEvent.CustomNetworkEvent` to deliver messages to an event listener. There is one "bus" for each channel, due to the impossibility of filtering a bus for specific events. This event driven system completely wraps the netty code. Mod code deals with FMLProxyPackets directly. It is not possible to enhance the netty pipeline, and I would expect highly unexpected results if it were modified reflectively. Use a real ChannelHandler if you want to use netty.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `fireUserEvent(java.lang.Object evt, io.netty.channel.ChannelHandlerContext ctx)`
    `void` | `register(java.lang.Object object)` Register an event listener with this channel and bus.
    `void` | `sendTo(FMLProxyPacket pkt, EntityPlayerMP player)` Send to a specific player
    `void` | `sendToAll(FMLProxyPacket pkt)` Send a packet to all on the server
    `void` | `sendToAllAround(FMLProxyPacket pkt, NetworkRegistry.TargetPoint point)` Send to all around a point
    `void` | `sendToDimension(FMLProxyPacket pkt, int dimensionId)` Send to all in a dimension
    `void` | `sendToServer(FMLProxyPacket pkt)` Send to the server
    `void` | `unregister(java.lang.Object object)` Unregister an event listener from the bus.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### register

          public void register(java.lang.Object object)

      Register an event listener with this channel and bus. See `SubscribeEvent`
      Parameters:
        `object` -

    - #### unregister

          public void unregister(java.lang.Object object)

      Unregister an event listener from the bus.
      Parameters:
        `object` -

    - #### fireUserEvent

          public void fireUserEvent(java.lang.Object evt,
                           io.netty.channel.ChannelHandlerContext ctx)

    - #### sendToAll

          public void sendToAll(FMLProxyPacket pkt)

      Send a packet to all on the server
      Parameters:
        `pkt` -

    - #### sendTo

          public void sendTo(FMLProxyPacket pkt,
                    EntityPlayerMP player)

      Send to a specific player
      Parameters:
        `pkt` -
        `player` -

    - #### sendToAllAround

          public void sendToAllAround(FMLProxyPacket pkt,
                             NetworkRegistry.TargetPoint point)

      Send to all around a point
      Parameters:
        `pkt` -
        `point` -

    - #### sendToDimension

          public void sendToDimension(FMLProxyPacket pkt,
                             int dimensionId)

      Send to all in a dimension
      Parameters:
        `pkt` -
        `dimensionId` -

    - #### sendToServer

          public void sendToServer(FMLProxyPacket pkt)

      Send to the server
      Parameters:
        `pkt` -