I think there's another way to do this, cuz if I make 20 random spawn for example, and my server has 21 players, what will happen to the last player? He will spawn in an already occupied spawn point..
As I said "20 or more", this is what I meant, else if it is a 'small' server, you probably won't need more than 30. If it grows bigger and/or too many people are AFK, add some more spawn points