Classical spin systems in the presence of a wall: Multicomponent spins