> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sentrystudios.org/llms.txt
> Use this file to discover all available pages before exploring further.

# SentrySettings

> A deep dive into configuring SentrySettings, covering databases, default toggles, and network optimizers.

SentrySettings generates heavily documented configuration files. This guide will walk you through the core backend functionality, from disabling specific toggles in the GUI to tuning the dangerous PvP packet optimizers.

<Info>
  Looking for the full default code templates? Check out the complete, downloadable versions by running the jar.
</Info>

***

## 1. Main Configuration (`config.yml`)

The `config.yml` controls the database connection and the default states for every single toggle in the GUI.

### 1.1 Database Selection

SentrySettings needs a place to store the personal preferences of every player.

```yaml config.yml theme={null}
database:
  type: H2
  sqlite:
    enabled: false
  h2:
    enabled: true
  mysql: # Required for multi-server networks
    enabled: false
    host: localhost
    port: 3306
    database: settings
    username: root
    password: ''
    useSSL: false
```

**Frequently Asked Questions:**

* **Which database should I use?** If you run a single survival/factions server, use **H2**. It's fast, embedded, and requires zero setup. If you run a network (e.g., multiple servers connected via BungeeCord/Velocity) and want settings (like hidden chats) to sync across them, you **must** use **MYSQL**.

### 1.2 Default Player States

What happens when a new player logs in for the first time? The `defaults` block determines whether a setting is automatically turned `true` or `false` before they ever open the menu.

<AccordionGroup>
  <Accordion title="Default Configuration Values" icon="toggle-on" iconType="duotone">
    ```yaml config.yml theme={null}
    defaults:
      global-chat: true
      player-visibility: true
      lobby-speed-boost: false
      night-vision-goggles: false
      crystal-pvp-optimizer: false
      fps-optimization: false
    ```

    <Note>
      If a player manually toggles a setting in-game, it is saved to the database and will override this default value forever.
    </Note>
  </Accordion>

  <Accordion title="Disabling Features Globally" icon="ban" iconType="duotone">
    If you do not want your players to have access to specific settings (e.g., you want to force everyone to see global chat), you can remove the item from the GUI entirely using the `toggles` block:

    ```yaml config.yml theme={null}
    toggles:
      global-chat: false # Removes the Global Chat toggle from the GUI
      night-vision-goggles: true
    ```
  </Accordion>
</AccordionGroup>

***

## 2. Packet Optimizers & PvP Engines

SentrySettings uses **ProtocolLib** to intercept incoming and outgoing packets. By manipulating these packets, we can artificially lower a player's ping or optimize the hit-registration of their sword swings and end crystals.

<Warning>
  **Anti-Cheat Flag Warning:** SentrySettings overrides standard Minecraft physics packets. If you set the optimizer intensity to `EXTREME`, standard anti-cheats (like Vulcan or GrimAC) **WILL** falsely ban your players for Reach or KillAura!
</Warning>

### 2.1 Optimizer Tuning

You can control the intensity of the network manipulation in the `optimizer-tuning` section.

```yaml config.yml theme={null}
optimizer-tuning:
  sword-pvp-optimizer: OPTIMIZED
  crystal-pvp-optimizer: OPTIMIZED
  anchor-pvp-engine: OPTIMIZED
  ping-spoofer: OPTIMIZED
  allow-ultra-low-fps: true
```

<AccordionGroup>
  <Accordion title="Available Tuning Intensities" icon="gauge-high" iconType="duotone">
    <ResponseField name="NORMAL" type="String">
      Disables all packet manipulation. Reverts to vanilla hit-registration, is a "fake" spoofer optimizer.
    </ResponseField>

    <ResponseField name="OPTIMIZED" type="String" required>
      The recommended default. Safely optimizes packet order to reduce latency without triggering anti-cheats.
    </ResponseField>

    <ResponseField name="EXTREME" type="String">
      Aggressive packet spoofing. Provides the best competitive advantage but **requires** you to whitelist players or disable your anti-cheat's combat checks.
    </ResponseField>
  </Accordion>
</AccordionGroup>

***

<Frame>
  <img src="https://mintcdn.com/sentrystudios/GsW51vOCk9P_kqX3/images/Screenshot-2026-07-26-173813.png?fit=max&auto=format&n=GsW51vOCk9P_kqX3&q=85&s=33e6fec7546a2d56bfa4a1f941e083a0" alt="Screenshot 2026 07 26 173813" width="1919" height="1079" data-path="images/Screenshot-2026-07-26-173813.png" />
</Frame>
