A heroin and crack cocaine dealer who played football instead of attending court has been jailed for more than three years.