4 in court in Clay County detective's killing