The standard API (on the Pi edition) doesnt support multi-player but RaspberryJuice on the PC and Mac does.
You need a modded python library (the files in MyAdventures/mcpi to make it work, which I didnt include in the standard starter kits for obvious reasons, but I have just included them in the
latest canarymod starter kit (0.5).
To use the multiplayer functions you need to pass the players name when you create a connection to minecraft.
Syntax is:
mc = minecraft.Minecraft.create(ipaddress, port, name)
The ip address is defaulted to the local host, the port is defaulted to 4711, and the player is defaulted to the 'host player'.
To create a connection to a specific player you can use:
mc = minecraft.Minecraft.create(name = "martinohanlon")
Its brilliant you are pushing the boundaries way outside the adventures in the book.