> 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/restricted-actions.md).

# 제한된 작업

그 `RestrictedActions` 모듈은 장면이 민감한(따라서 제한된) 기능에 접근할 수 있게 합니다. 이는 [`권한`](https://github.com/decentraland/docs/tree/main/contributor/content/entity-types/scenes/README.md#permissions) 시스템과 연결되어 있으며, 장면은 이를 사용해 개별 메서드의 사용을 요청합니다.

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

{% hint style="info" %}
World Explorer 구현자로서, 런타임에 권한 강제가 전혀 없을 수도 있습니다. 우리는 **강력히** 이를 권장하지 않습니다. 플레이어를 위험에 빠뜨리기 때문입니다.
{% endhint %}

제한된 기능의 대부분은 이 모듈에서 제공되지만, 제한된 [전역 함수](https://github.com/decentraland/docs/tree/main/contributor/globals/README.md).

이 모듈에는 다음 메서드와 타입이 포함되어 있습니다:

* [`function movePlayerTo`](#movePlayerTo)
* [`function teleportTo`](#teleportTo)
* [`function triggerEmote`](#triggerEmote)
* [`function changeRealm`](#changeRealm)
* [`function openExternalUrl`](#openExternalUrl)
* [`function openNftDialog`](#openNftDialog)
* [`function setCommunicationsAdapter`](#setCommunicationsAdapter)
* [`interface Vector3`](#Vector3)

### 메서드

아래 각 메서드는 특정 [권한](https://github.com/decentraland/docs/tree/main/contributor/content/entity-types/scenes/README.md#permissions) 장면 매니페스트에서 요청할 수 있는 항목과 연결됩니다.

**`movePlayerTo`**

플레이어를 현재 위치를 기준으로 한 새 위치로 이동시키고, 필요하면 카메라 타깃을 다음으로 설정합니다: [벡터](#Vector3).

다음이 필요합니다: [`ALLOW_TO_MOVE_PLAYER_INSIDE_SCENE`](https://github.com/decentraland/docs/tree/main/contributor/content/entity-types/scenes/README.md#permissions) 권한.

```ts
interface Request {
  newRelativePosition: Vector3;
  cameraTarget?: Vector3;
}

인터페이스 Response {
    // 플레이어가 새 위치로 이동한 뒤, 그리고 플레이어가 이동을 중단하지 않았다면 이는 true가 됩니다.
  success: boolean;
}

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

**`teleportTo`**

플레이어를 특정 파셀로 재배치하며, 필요하면 다른 렐름으로 이동할 수 있습니다.

사전에 승인된 권한을 요구하는 대신, 각 호출은 `teleportTo` 플레이어의 승인을 받아야 합니다.

```ts
interface Request {
  // 착지할 파셀입니다. 생략 시: 렐름의 기본 스폰
  // (realm과 함께 사용할 때만 의미가 있습니다).
  worldCoordinates?: Vector2;

  // 파셀이 속한 렐름: 월드 이름(`foo.dcl.eth`) 또는 렐름 URL.
  // 설정하면, 클라이언트는 렐름을 변경하고(완전한 재연결, 플레이어가 이미
  // 해당 렐름에 있더라도) 그런 다음 그곳의 파셀에 착지합니다.
  // 생략 시: 파셀은 플레이어의 현재 렐름에 있습니다.
  realm?: string;
}

interface Response {}

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

**`triggerEmote`**

미리 정의된 이름 중 하나를 사용해 플레이어의 아바타에 감정 표현 애니메이션을 표시합니다.

다음이 필요합니다: [`ALLOW_TO_TRIGGER_AVATAR_EMOTE`](https://github.com/decentraland/docs/tree/main/contributor/content/entity-types/scenes/README.md#permissions) 권한.

```ts
interface Request {
  predefinedEmote: string;
}

interface Response {}

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

**`openExternalUrl`**

적절한 UI(다른 애플리케이션일 수도 있음)를 사용해 플레이어에게 웹사이트 표시를 제안합니다.

다음이 필요합니다: [`OPEN_EXTERNAL_LINK`](https://github.com/decentraland/docs/tree/main/contributor/content/entity-types/scenes/README.md#permissions) 권한.

```ts
interface Request {
  url: string;
}

인터페이스 Response {
  // 플레이어가 링크 열기를 승인했는지 여부.
  success: boolean;
}

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

**`openNftDialog`**

적절한 UI를 사용해 플레이어에게 NFT 정보를 표시합니다.

```ts
interface Request {
  // NFT의 URN.
  urn: string;
}

인터페이스 Response {
  // NFT를 성공적으로 찾았고 이미지나 비디오로 참조되었는지 여부.
  success: boolean;
}

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

**`changeRealm`** (사용 중단됨)

기본 URL을 사용해 World Explorer를 다른 콘텐츠 서버로 전환합니다.

다음의 사용을 권장하며 더 이상 사용되지 않습니다: [`teleportTo`](#teleportTo) 다음과 함께: `렐름` (그리고 없음 `worldCoordinates` 렐름의 기본 스폰 위치에 대해). `changeRealm` 새 렐름이 활성화될 때가 아니라 변경이 승인되는 즉시 resolve되므로, `teleportTo` 그 직후에 발행된 것은 이전 렐름을 대상으로 실행됩니다.

```ts
interface Request {
  // 새 렐름의 URL.
  realm: string;

  // 변경을 승인해야 할 때 사용자에게 표시할 선택적 메시지.
  message?: string;
}

인터페이스 Response {
  // 렐름 변경이 승인되었고 성공했는지 여부.
  success: boolean;
}

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

### 타입

이 모듈의 메서드에서 사용되는 추가 타입은 오직 다음입니다: `Vector3`.

**`Vector3`**

상대적 또는 절대적인 3D 위치를 보관합니다.

```ts
interface Vector3 {
  x: number;
  y: number;
  z: number;
}
```


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

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

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
