I'm attempting to make a fully customized map that I want to only be single player. I'm going to be using custom sounds with my voice, and wanted to determine whether or not a group of people are playing multiplayer so I can present them with a custom clip of me saying "this map will only work in Single Player" or something similar.
I've thought about making a simple command block that triggers after x amount of time using chain command blocks, with the following command;
execute unless @a[limit=1] run playsound ..
The problem with this, however, is I'm not entirely certain that the
limit selector will work this way. In theory, of course, it should, but being unable to test multiplayer myself makes this a little difficult.
Another, more sure-fire, way would be to do three scoreboards and match them all up together to create a tally system, but not only would that be countless hours of tedious brain-knocking before eventually making a flawless system, but it wouldn't be necessarily flawless and could mess up at any given moment.
Would there be any way to find how many players there are in a world--and if so, to run a command if there are x people?