# Script

{% hint style="warning" %}
Since v1.2.0

Script is an advanced feature and not recommend for most users
{% endhint %}

Allow making operations to server with JavaScript

### Configurations

**advanced/config.yml**

```yaml
scripts: false
```

**advanced/scripts.yml**

```yaml
# Fill with filenames in "script" folder
# DO NOT LOAD FILES IN "std" FOLDER AS SCRIPTS
enables:
  - example.js

# Script permissions
permissions:
  # Allow scripts using HTTP, may leak your IP address or more information
  allow-http: false

  # Allow scripts using java reflection to access all classes loaded in current server, may break permission rules
  allow-reflect: false
  # Allow scripts reference Bukkit classes with reflection, not works if allow-reflect enabled
  allow-bukkit-reflect: true
  # Allow scripts reference NMS classes with reflection, not works if allow-reflect enabled
  allow-nms-reflect: false

  # Allow scripts use eval to load libraries or execute other scripts, it is recommended to place the libraries in the lib directory
  allow-eval: false

```

### Installation

Put scripts into **advanced/scripts** folder

Put libraries into **advanced/scripts/lib** folder, **JS files in this folder will be loaded automatically in each script context**

### API

When script feature enabled, an example script file will be saved in **advanced/scripts/example.js**

**See** [**ScriptAPI**](https://afternode.gitbook.io/general-script-api/)


---

# Agent Instructions: 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:

```
GET https://afternode.gitbook.io/general/advanced/script.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
