# ServerVariables Wiki

## Description

This plugin allows you to create your own variables for the server and players, meaning you have total control on which values you set. Variables are modified through commands, and you can obtain them by using the `/svar get` command or via PlaceholderAPI.

Some examples of what you can do with the plugin:

{% tabs %}
{% tab title="Example 1" %}
Economy system with multiple currencies

```yaml
variables:
  currency_1:
    variable_type: PLAYER
    value_type: INTEGER
    initial_value: 0
    limitations:
      min_value: 0
  currency_2:
    variable_type: PLAYER
    value_type: DOUBLE
    initial_value: 1.50
    limitations:
      max_decimals: 3
```

{% endtab %}

{% tab title="Example 2" %}
A portal that has an on/off status.

```yaml
variables:
  lobby_portal_status:
    variable_type: GLOBAL
    value_type: TEXT
    possible_values:
    - off;&c&lPortal Disabled
    - on;&a&lPortal Enabled
    initial_value: 'off'
```

{% endtab %}

{% tab title="Example 3" %}
Custom player points system.

```yaml
variables:
  player_points:
    variable_type: PLAYER
    value_type: INTEGER
    initial_value: 0
```

{% endtab %}

{% tab title="Example 4" %}
List of participants allowed to join to a certain event.

```yaml
variables:
  event_whitelisted_players:
    variable_type: GLOBAL
    value_type: LIST
    initial_value:
    - Ajneb
    - KleinTada
```

{% endtab %}

{% tab title="Other Examples" %}

* Set a number of infractions to a player when they do something wrong.
* A life system, tracking when the player dies and reducing the amount of lives the player has (Using my plugin [ConditionalEvents](https://www.spigotmc.org/resources/conditionalevents-custom-actions-for-specific-events-1-8-1-20.82271/)).
  {% endtab %}
  {% endtabs %}


---

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