A referee needed 30 stitches after being brutally attacked by a bunch of year eight students at a youth basketball game.