This mod allows players to create and remotely control Avatars. Avatars act like players, with a few minor exceptions. The mod also includes a few custom entities to control and create the Avatars.
Attempting to control an avatar already in use by another player can throw an uncaught exception if it was lost track of due to a surface switch and reacquired using /repair_avatars while the other player remains connected. Perhaps /repair_avatars should check if an avatar is currently being controlled?
Had a busy holiday season, but I was able to get some work done this weekend. I think I was able to fix this in 0.5.22, but I don't have a good setup for multiplayer to fully test it. I have added 2 defenses for this though, both should prevent the crash on their own, so I think it should be fine.