    001    package cpw.mods.fml.common.modloader;
    002
    003    import net.minecraft.src.NetHandler;
    004    import net.minecraft.src.NetServerHandler;
    005    import net.minecraft.src.Packet3Chat;
    006    import cpw.mods.fml.common.network.IChatListener;
    007
    008    public class ModLoaderChatListener implements IChatListener
    009    {
    010
    011        private BaseModProxy mod;
    012
    013        public ModLoaderChatListener(BaseModProxy mod)
    014        {
    015            this.mod = mod;
    016        }
    017
    018        @Override
    019        public Packet3Chat serverChat(NetHandler handler, Packet3Chat message)
    020        {
    021            mod.serverChat((NetServerHandler)handler, message.message);
    022            return message;
    023        }
    024
    025        @Override
    026        public Packet3Chat clientChat(NetHandler handler, Packet3Chat message)
    027        {
    028            mod.clientChat(message.message);
    029            return message;
    030        }
    031
    032    }