# Setup

Instructions on how to setup AnimVanish

Download the latest version from [Spigot](https://www.spigotmc.org/resources/animvanish-1-19-animated-vanishing.102183/), [Hangar](https://hangar.papermc.io/ArikSquad/AnimVanish) or [Jenkins](https://ci.mikart.fi)


# Permissions

Learn which permissions AnimVanish uses and what they mean.

## Permission nodes:

{% tabs %}
{% tab title="Permission Nodes" %}
{% hint style="info" %}
\<effect> means the a name of an effect. For example `lightning`.
{% endhint %}

| Permission node            | Default | Description                                            |
| -------------------------- | ------- | ------------------------------------------------------ |
| animvanish.\*              | `FALSE` | All the permissions in AnimVanish.                     |
| animvanish.reload          | `FALSE` | Allows to reload the plugin                            |
| animvanish.help            | `TRUE`  | Allows to use the help command                         |
| animvanish.invis.\*        | `FALSE` | All the invisibility effects                           |
| animvanish.invis.\<effect> | `FALSE` | Grants the permission for the individual effect        |
| animvanish.invis.other     | `FALSE` | Allows to use the invisibility effect on other players |
| animvanish.invis.gui       | `FALSE` | Ability to open the invisibility selection menu        |
|                            |         |                                                        |

{% endtab %}

{% tab title="Per effect permission" %}
*list coming soon*
{% endtab %}
{% endtabs %}


# Frequently Asked Questions

Learn how to solve annoying configuration and plugin errors that stop the plugin from working.

Page coming soon. visit [our discord](https://discord.gg/xh9WAvGdVF) for support while waiting.


# Effects

List of all the effects in the plugin.

* Blidness\
  *Will blind nearby players for a small time*<br>
* Blood\
  *Spawn small amount of redstone particles*<br>
* Firework\
  *Shoots an firework upwards*<br>
* Launch\
  *Launches player upwards*<br>
* Lightning\
  *A lightning will strike trough the player*<br>
* NPC\
  *Spawns an NPC for couple seconds using Citizens*<br>
* Particle\
  *Spawns selected particles*<br>
* Sound\
  *Plays a selected sound*<br>
* TNT\
  *Spawns a* [*TNT*](#user-content-fn-1)[^1]<br>
* Turn\
  *Turns people 180°*

[^1]: TNT does not break it's surroundings


# config.yml

You will learn step by step what every option of the regular config file means and how to configure them.

## General  Settings

These are the general settings the plugin offers you to configure. Please learn about yaml before editing the configuration since yaml doesn't tolerate any errors.

### language: (str)

The setting for locale. Possible values: `en-us`, `fi_fi`

```yaml
language: en-us
```

### debug: (bool)

The first option is a boolean which makes the plugin print debugging info to the console.

```yaml
debug: false
```

### update\_checker: (bool)

Here you can set if you want to check for new updates. If it's set to true, it will tell if new updates are available for download.

```yaml
update_checker: true
```

## Effect settings

All the settings for all effects. You can configure them how you like.

### lightning:

You can set if the time is set to night when the effect is ran. It's set to `true` by default.

```yaml
  lightning:
    # Will the time set to night with the effect? Default: true
    night: true
```

### particle:

Configure what particle will be used when using particle as the effect and how many particles will be spawned upon vanishing.

{% hint style="warning" %}
`type` only allows one of these enums: <https://hub.spigotmc.org/javadocs/spigot/org/bukkit/Particle.html#enum-constant-summary>
{% endhint %}

```yaml
  particle:
    # What particle will be used when using particle as the effect. Docs: https://animvanish.mikart.eu/configuration/config.yml#particle
    type: DRAGON_BREATH
    # How many particles will be spawned. Default: 50
    amount: 50
```

### sound:

Configure what sound will the player hear.&#x20;

{% hint style="warning" %}
This value only allows these enums: <https://hub.spigotmc.org/javadocs/bukkit/org/bukkit/Sound.html#enum-constant-summary>
{% endhint %}

```yaml
  sound:
    # What sound the player will hear. Default: BLOCK_AMETHYST_BLOCK_HIT Docs: https://animvanish.mikart.eu/configuration/config.yml#sound
    type: BLOCK_AMETHYST_BLOCK_HIT
```

### blindness:

Configure the settings what happens when blindness effect is ran.

```yaml
blindness:
    # How many seconds the blindness effect will last. Default: 3
    duration: 3
    # Radius of how many blocks the blindness effect will reach. Default: 10
    radius: 10
```

### firework:

Set the colors and type for firework effect. You can make it look really cool by setting some nice colors. **Use hex color formatting**.

{% hint style="warning" %}
Type must be one of these enums: <https://hub.spigotmc.org/javadocs/spigot/org/bukkit/FireworkEffect.Type.html#enum-constant-summary>
{% endhint %}

```yaml
firework:
    # What type of firework you want to have. Default: BURST Docs: https://animvanish.mikart.eu/configuration/config.yml#firework
    type: BURST
    # Colors of the firework. Default: ['#FF0000', '#00FF00', '#0000FF', '#FFFF00', '#00FFFF']
    colors:
    - '#FF0000'
    - '#00FF00'
    - '#0000FF'
    - '#FFFF00'
    - '#00FFFF'
```

### npc:

Set how many seconds will the npc be visible.

{% hint style="warning" %}
Duration can't be set to more than 30 seconds. It will default to 3 in a case where it's anywhere higher than that.
{% endhint %}

```yaml
npc:
    # How many seconds the NPC will be visible. Default: 3
    duration: 3
```

### launch:

Configure if launch effect Armor Stands should use the players' own armor.

```yaml
  launch:
    # Enable if launch effect Armor Stands should use the players' own armor. Default: true
    use_player_armor: true
```

## Default Configurations

<details>

<summary>config.yml</summary>

```yaml
# ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
# ┃       AnimVanish Config      ┃
# ┃    Developed by ArikSquad    ┃
# ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
# ┣╸ Information: https://github.com/ArikSquad/AnimVanish
# ┣╸ Config Help: https://animvanish.mikart.eu/configuration/config.yml
# ┗╸ Documentation: https://animvanish.mikart.eu/

# Locale of the default language file to use. Docs: https://animvanish.mikart.eu/configuration/language-files
language: en-us
# Whether to enable debug mode. This will print additional information to the console.
debug: false
# Whether to enable the plugin's update checker.
update_checker: true
# All settings related to the effects.
effects:
  lightning:
    # Will the time set to night with the effect? Default: true
    night: true
  particle:
    # What particle will be used when using particle as the effect. Docs: https://animvanish.mikart.eu/configuration/config.yml#particle
    type: DRAGON_BREATH
    # How many particles will be spawned. Default: 50
    amount: 50
  sound:
    # What sound the player will hear. Default: BLOCK_AMETHYST_BLOCK_HIT Docs: https://animvanish.mikart.eu/configuration/config.yml#sound
    type: BLOCK_AMETHYST_BLOCK_HIT
  blindness:
    # How many seconds the blindness effect will last. Default: 3
    duration: 3
    # Radius of how many blocks the blindness effect will reach. Default: 10
    radius: 10
  firework:
    # Colors of the firework. Default: ['#FF0000', '#00FF00', '#0000FF', '#FFFF00', '#00FFFF']
    colors:
    - '#FF0000'
    - '#00FF00'
    - '#0000FF'
    - '#FFFF00'
    - '#00FFFF'
  npc:
    # How many seconds the NPC will be visible. Default: 3
    duration: 3
  launch:
    # Enable if launch effect Armor Stands should use the players' own armor. Default: true
    use_player_armor: true
```

</details>

<details>

<summary>messages-xx-xx.yml</summary>

```yaml
# ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┓
# ┃     AnimVanish - Locales     ┃
# ┃    Developed by ArikSquad    ┃
# ┣━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛
# ┣╸ Thanks for using AnimVanish.
# ┗╸ Translate AnimVanish: https://github.com/ArikSquad/AnimVanish

locales:
  prefix: '[<gradient:#77DD77:#AFEEEE>AnimVanish</gradient>]'
  invalid_args: <prefix> <red>Invalid arguments.</red>
  not_player: <prefix> <red>You must be a player.</red>
  reload: <prefix> <color:#b0ff5c>Reloaded configs</color>
  player_not_found: <prefix> <red>Player not found.</red>
  no_permissions: <prefix> <red>You don't have permissions to use this command.</red>
    <green>(%1%)</green>
  only_to_vanish: <prefix> <red>This effect only applies when going into vanish.</red>
  not_found: <prefix> <red>Effect was not found.</red>
  particle_invalid_config: <prefix> <red>Invalid particle configuration. Ask an administrator
    to check config file.</red>
  blindness_message: <prefix> <yellow>You saw something and you now feel dizzy</yellow>
  blindness_author: <prefix> <green>You blinded all the players around you.</green>
  sound_invalid_config: <prefix> <red>Invalid sound configuration. Ask an administrator
    to check config file.</red>
  turn_none: <prefix> <color:#ff926e>Nobody was turned, because there is nobody close
    to you.</color>
  launch_no_space: <prefix> <red>There is no space to launch an armor stand</red>
  gui_title: <color:#e26eff>Select an effect</color>
  gui_placeholder_name: <gray>Select an effect</gray>
  gui_item_name: <green>%1%</green>
  gui_item_lore: <blue>%1%</blue>
  dependency_no_citizens: <prefix> <red>You must have Citizens installed to use this
    effect.</red>
  dependency_no_vanish: <prefix> <red>You must have a supported vanish plugin installed
    to use this command.</red>

```

</details>


# Language files

How to change your language and/or update or help create new translations files.

You can choose your preferred language in the [config.yml](/configuration/config.yml#locale-str). The default language is `en-us` (English). The `messages-xx-xx.yml` is formatted using [MiniMessage](https://docs.advntr.dev/minimessage/index.html).&#x20;

### Help us translate the plugin!

To help us translate the plugin create a new file in the `common/src/main/resources/locales/` folder names xx-xx.yml. Name the file using the correct [ISO 639-1](https://en.wikipedia.org/wiki/List_of_ISO_639_language_codes) locale code for your language and dialect.

#### Thing to remember

* **Don't** translate the MiniMessage keys (like `<red>`)
* Do not translate the locale keys themselves (e.g. `not_player`)


# Vanish Hooks

All the supported vanish plugins in their preferred order. The plugin will choose first one it finds. In the future the plugin will most likely include a vanish plugin inside.

1. [PremiumVanish](https://www.spigotmc.org/resources/premiumvanish-stay-hidden-bungee-velocity-support.14404/)
2. [SuperVanish](https://www.spigotmc.org/resources/supervanish-be-invisible.1331/)
3. [AdvancedVanish](https://www.spigotmc.org/resources/advancedvanish.86036/)


# Citizens

Citizens is required for the [NPC effect](/configuration/config.yml#npc).


