> For the complete documentation index, see [llms.txt](https://ajneb97.gitbook.io/servervariables/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ajneb97.gitbook.io/servervariables/commands-and-permissions.md).

# Commands and Permissions

## Main Commands

{% hint style="info" %}

* For commands used to modify variables, the player parameter is only necessary when the specified variable type is set to **PLAYER**.&#x20;
* You can add `silent:true` to the end of a command to hide the information/feedback message.
* Command alias: `/servervariables`
  {% endhint %}

| Command                                                           | Description                                                                                                                                             |
| ----------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- |
| /svar set \<variable> \<value> \<player> (optional)silent:true    | <p>Sets the value to the variable.<br><br>You can also set a value with spaces:<br><code>/svar set \<variable> "value with spaces" \<player></code></p> |
| /svar get \<variable> \<player>                                   | Gets the value of the variable.                                                                                                                         |
| /svar add \<variable> \<value> \<player> (optional)silent:true    | Adds a value to a variable, only if the variable value type is set to INTEGER or DOUBLE.                                                                |
| /svar reduce \<variable> \<value> \<player> (optional)silent:true | Reduces the value of a variable, only if the variable value type is set to INTEGER or DOUBLE.                                                           |
| /svar reset \<variable> \<player>/\* (optional)silent:true        | <p>Resets the value of a variable to the default/initial value.</p><p><br>\* means all players.</p><p>(This will also modify offline player files)</p>  |
| /svar reload                                                      | Reloads the config.                                                                                                                                     |

## List Commands

When you want to access or modify LIST variables you must use these commands instead.

{% hint style="info" %}

* The first element of a list will always be INDEX 0.
* The silent:true parameter works as well as in the main commands.
  {% endhint %}

| Command                                                | Description                                                                                                                                       |
| ------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| /svar list get \<variable> \<index> \<player>          | Gets the value at a certain index of the list.                                                                                                    |
| /svar list set \<variable> \<index> \<value> \<player> | Sets a new value on a certain index of the list.                                                                                                  |
| /svar list add \<variable> \<value> \<player>          | Adds a new value to the end of the list.                                                                                                          |
| /svar list removeindex \<variable> \<index> \<player>  | Removes the element at the specified index from the list.                                                                                         |
| /svar list removevalue \<variable> \<value> \<player>  | Removes the first occurrence of the value from the list.                                                                                          |
| /svar list reset \<variable> \<player>/\*              | <p>Resets the value of the list to the default/initial value.<br><br>\* means all players.</p><p>(This will also modify offline player files)</p> |
| /svar list display \<variable> \<player>               | Displays all the elements of the list.                                                                                                            |

## Permissions

| Permission            | Description                           |
| --------------------- | ------------------------------------- |
| servervariables.admin | Grants access to all plugin commands. |


---

# 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://ajneb97.gitbook.io/servervariables/commands-and-permissions.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.
