> For the complete documentation index, see [llms.txt](https://docs.decentraland.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.decentraland.org/contributor/contributor-ko/scene-runtime/runtime-modules/players.md).

# 플레이어들

이 `플레이어들` 모듈은 허용합니다 [장면](https://github.com/decentraland/docs/blob/main/contributor/content/entity-types/scenes/README.md) 주변 환경에서 플레이어를 찾아 그들의 신원과 [프로필](https://github.com/decentraland/docs/blob/main/contributor/content/entity-types/profiles/README.md).

```ts
const Players = require("~system/Players");
```

다음 메서드와 타입을 포함합니다:

* [`함수 getPlayersInScene`](#getPlayersInScene)
* [`함수 getConnectedPlayers`](#getPlayersInScene)
* [`함수 getPlayerData`](#getPlayerData)
* [`인터페이스 Player`](#Player)
* [`인터페이스 UserData`](#UserData)

### 메서드

이 모듈에는 장면의 플레이어를 찾는 두 가지 메서드와, 그들의 프로필을 가져오는 한 가지 메서드가 있습니다.

**`getPlayersInScene`**

다음을 반환합니다 [`플레이어`](#Player) 배열로, 각 항목에는 `userId` 다음에서 사용할 수 있는 [getPlayerData](#getPlayerData).

```ts
interface Request {}

interface Response {
  players: Player[];
}

function getPlayersInScene(Request): Promise<Response>;
```

**`getConnectedPlayers`**

```ts
interface Request {}

interface Response {
  players: Player[];
}

function getConnectedPlayers(Request): Promise<Response>;
```

**`getPlayerData`**

반환합니다 [`UserData`](#UserData) 주어진 값에 대해 알려진 경우, 사용자에 대한 `userId`.

```ts
interface Request {
  // 사용자 식별자(비게스트의 경우 Ethereum 주소).
  userId: string;
}

interface Response {
  // 이 사용자의 프로필 정보, उपलब्ध한 경우.
  data?: UserData;
}

function getPlayerData(Request): Promise<Response>;
```

### 타입

이 모듈에는 두 가지 타입만 있습니다: [`플레이어`](#Player) 및 [`UserData`](#UserData).

**`플레이어`**

다음에 대한 참조를 보유합니다 `userId`.

```ts
interface Player {
  // 사용자 식별자(비게스트의 경우 Ethereum 주소).
  userId: string;
}
```

**`UserData`**

사용자, 그들의 신원 및 아바타에 대한 (일부일 수 있는) 정보를 담고 있습니다.

World Explorers는 이 정보를 다음을 통해 가져옵니다 [콘텐츠 시스템](https://github.com/decentraland/docs/blob/main/contributor/content/overview/README.md).

이 [프로필 엔티티 정의](https://github.com/decentraland/docs/blob/main/contributor/content/entity-types/profiles/README.md) 이 모든 필드와 그 이상을 자세히 설명합니다. ...의 구조와 키는 `UserData` 약간 다르지만, 각 필드의 의미는 같습니다.

```ts
export interface UserData {
  // 사용자 식별자(즉, Ethereum 주소).
  userId: string;

  // UI에서 부를 이름.
  displayName: string;

  // 그들이 서명에 사용하는 이더리움 공개 키.
  publicKey?: string;

  // web3 기능이 활성화되어 있는지 여부.
  hasConnectedWeb3: boolean;

  // 이 정보의 순차 버전이며, 사용자 업데이트마다 증가합니다.
  version: number;

  // 가능한 경우 아바타에 대한 정보.
  avatar?: {
    // 이 아바타를 렌더링하는 데 필요한 자산에 대한 포인터.
    bodyShape: string;
    wearables: string[];

    // 다른 신체 부위에 대한 16진수 인코딩된 RGB/RGBA 색상 틴트.
    skinColor: string;
    hairColor: string;
    eyeColor: string;

    // 이 아바타의 "사진"에 대한 파일 식별자.
    snapshots?: {
      face256: string;
      body: string;
    };
  };
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.decentraland.org/contributor/contributor-ko/scene-runtime/runtime-modules/players.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
