Sheriff: Calif. teen planned attack on classmates