18-year-old accused of plotting to kill students appears in court