# Main Configuration

> **Info:**
Changes made by hand in config.yml apply with /pnpc reload. Options changed from **Editor > Settings** are saved straight away.

## Language

The language of every message and menu. See [Languages & Translations](languages.md).

<figure><img src="../.gitbook/assets/settings/language.png" alt="" width="563"><figcaption><p>Settings (Language)</p></figcaption></figure>

## Debug

Adds verbose logging to the console, useful when reporting an issue.

## Storage

Where the NPCs are kept: `yaml` (one file per NPC in the npcs folder), `sqlite`, `mysql` or `mariadb`. A database needs its address, port, name, username and password, and a table prefix. If it cannot be reached, the files in the npcs folder are used until the next reload. `/pnpc storage status` shows what is in use and `/pnpc storage migrate <from> <to>` copies NPCs between types, see [Commands](../plugin-information/commands.md). Only set in the file.

## Sync

Servers that share one MySQL or MariaDB database share their NPCs. Give each server a name; a change on one server reaches the others by checking the database every few seconds, or instantly when Redis is on. Redis needs a host, port and channel, and a password and SSL if yours uses them. The Redis client is downloaded by the server when the plugin loads. Each NPC can be limited to some servers, see [Servers](../main-features/npcs/edit-npc.md#servers). Only set in the file.

## Skin Refresh

Looks up the skins of player names again on a timer, so NPCs follow skin changes: how many minutes pass between refreshes, how many names are looked up per minute to stay under the Mojang limits, and, on a network, the one server that does it. Refresh Now runs it straight away.

<figure><img src="../.gitbook/assets/settings/skin-refresh.png" alt="" width="563"><figcaption><p>Settings (Skin Refresh)</p></figcaption></figure>

## Backups

Turns automatic backups on or off, sets the hours between them and how many days they are kept. See [Backups](../features/backups.md).

<figure><img src="../.gitbook/assets/settings/backups.png" alt="" width="563"><figcaption><p>Settings (Backups)</p></figcaption></figure>

## Visibility Distance

How many blocks away players can see an NPC, from 1 to 256. Used by every NPC whose own [visibility distance](../main-features/npcs/edit-npc.md#visibility-distance) is -1. A lower value means fewer packets sent to players who are far away.

<figure><img src="../.gitbook/assets/settings/visibility-distance.png" alt="" width="563"><figcaption><p>Settings (Visibility Distance)</p></figcaption></figure>

## Click Cooldown

How many milliseconds a player waits between clicks on an NPC. Used by every NPC whose own [click cooldown](../main-features/npcs/edit-npc.md#click-cooldown) is -1.

<figure><img src="../.gitbook/assets/settings/click-cooldown.png" alt="" width="563"><figcaption><p>Settings (Click Cooldown)</p></figcaption></figure>

## Hide Cooldown Message

When on, a click during the cooldown is ignored without sending the wait message.

<figure><img src="../.gitbook/assets/settings/hide-cooldown-message.png" alt="" width="563"><figcaption><p>Settings (Hide Cooldown Message)</p></figcaption></figure>

## Look Distance

How close a player has to be, in blocks, for an NPC with [Look](../features/looking.md) to turn its head to them, from 1 to 64. Applies to every NPC.

<figure><img src="../.gitbook/assets/settings/look-distance.png" alt="" width="563"><figcaption><p>Settings (Look Distance)</p></figcaption></figure>

## Tab Remove Delay

How many ticks a player NPC that is not shown in tab stays in the tab list after it appears, so its skin has time to load, from 1 to 1200. Applies to every NPC.

<figure><img src="../.gitbook/assets/settings/tab-remove-delay.png" alt="" width="563"><figcaption><p>Settings (Tab Remove Delay)</p></figcaption></figure>

## Pushback

Gently pushes a player away when they walk into or onto an NPC, so nobody stands inside one. Players in creative or spectator mode, riding something, or who cannot see the NPC are left alone. An NPC with its own pushback setting keeps it.

<figure><img src="../.gitbook/assets/settings/pushback.png" alt="" width="563"><figcaption><p>Settings (Pushback)</p></figcaption></figure>

## Pushback Strength

How hard a player is pushed away from an NPC, from 0.1 to 3. The upward lift and the milliseconds between two pushes are only set in the file.

<figure><img src="../.gitbook/assets/settings/pushback-strength.png" alt="" width="563"><figcaption><p>Settings (Pushback Strength)</p></figcaption></figure>

```yaml
pushback:
  enabled: true
  strength: 0.6
  lift: 0.1
  cooldown: 500
```

## Internal Pool Size

The number of threads the plugin keeps for its own background work. The default of `4` suits almost every server. Only set in the file.

```yaml
performance:
  internal-pool-size: 4
```

## MineSkin

Optional. Used for [skins from an image URL](../main-features/skins.md#image-url) and [skin files](../main-features/skins.md#skin-file), which upload faster and more reliably with a free key from [MineSkin](https://mineskin.org/account). `visibility` is how the skins you make are listed on MineSkin: `unlisted` keeps them off its public gallery. Only set in the file.

```yaml
mineskin:
  api-key: ''
  visibility: unlisted
```

## Dialogue Use Dialogs

Shows [dialogues](../features/dialogues.md) as Paper dialog screens where the server has them. When off, every dialogue is sent in chat. Only set in the file.

```yaml
dialogue-use-dialogs: true
```

## Allow Op Commands

Lets `[COMMAND] op; ...` actions run a command with OP for the player who clicked. Off by default, because a mistake in such a command, or a placeholder a player controls, gives that player OP powers for one command. While it is off, those commands are skipped and the console warns once per NPC. Only set in the file.

```yaml
actions:
  allow-op-commands: false
```

## Messages & Translations

Every message the plugin sends lives in the translation file rather than in config.yml. See [Languages & Translations](languages.md).

Source: https://www.phoenixplugins.com/docs/phoenix-npcs/configurations/main-configuration