public void HandleReceive(ByteReader data, bool reliable)
 {
     try
     {
         conn.HandleReceive(data, reliable);
     }
     catch (Exception e)
     {
         MpLog.Error($"Error handling packet by {conn}: {e}");
         Disconnect($"Receive error: {e.GetType().Name}: {e.Message}");
     }
 }
        public ServerPlayer OnConnected(IConnection conn)
        {
            if (conn.serverPlayer != null)
            {
                MpLog.Error($"Connection {conn} already has a server player");
            }

            conn.serverPlayer = new ServerPlayer(nextPlayerId++, conn);
            players.Add(conn.serverPlayer);
            MpLog.Log($"New connection: {conn}");

            return(conn.serverPlayer);
        }