How can I test my command block contraptions for multiplayer compatibiltiy?

I like making command block contraptions. Occasionally, I make a contraption that I want to use on a multiplayer server (or offer to server operators), but I don't know of a way to test that it'll actually work.

I don't run a server that I can test on, nor do I want to have to get friends/family on this non-existent server in order to do tests and debugging. I also don't have op privileges on another server where I could do these tests (nor would I want to since it could disrupt the server). Finally, I only own one Minecraft account, and I'm not really interested in buying a second account just for the purposes of testing command blocks.

So given that, what's the best way for me to perform my testing and debugging? Is there a simple (and legitimate) way for me to add one or more players that I can control to my otherwise single player command block world?


Solution 1:

What you could do to make your testing as real as possible is target entities with the @e selector in replacement of real players, and try testing your command blocks with entities like villagers.

For an example if you were trying to tp a player with /tp @p (Coordinates) You could replace @p or @a with @e to teleport entities.

@e should be effective for most contraptions involving players.

Note: This is how I test my contraptions unless I'm with a friend.