# Bungeecord/Network Setup

## Requirements

{% hint style="danger" %}
**You must have a punishment plugin that supports external databases I recommend using LiteBans or AdvancedBans as these both have the options which are required.**
{% endhint %}

{% hint style="danger" %}
**You will also need a MySQL Database (If your punishment plugin supports another database you may use this). I will not go through how to make a MySQL Database in this wiki, please refer to YouTube or your Minecraft host.**
{% endhint %}

## **Setup**

**Step 1:** Backup any database or config files.<br>

**Step 2:** Place both PunishmentGUI and your punishment plugin on each **SPIGOT** server not **BUNGEECORD**.<br>

**Step 3:** Enter the MySQL details for your database into your punishment plugin's config file. <br>

{% hint style="info" %}
The below example config.yml is from LiteBans, though most plugins will have a related section if it supports Databases.
{% endhint %}

**Before**

```
sql:
  # H2, MySQL, MariaDB, and PostgreSQL are supported database drivers.
  driver: H2

  ## MySQL/PostgreSQL settings ##
  # If using H2, the database will be stored in the LiteBans plugin folder,
  # and most of these settings won't apply.

  # Database server address.
  address: localhost:3306

  # Database name, username and password.
  database: 'litebans'
  username: ''
  password: ''

  table_prefix: 'litebans_'

```

**After**

```
sql:
  # H2, MySQL, MariaDB, and PostgreSQL are supported database drivers.
  driver: MySQL

  ## MySQL/PostgreSQL settings ##
  # If using H2, the database will be stored in the LiteBans plugin folder,
  # and most of these settings won't apply.

  # Database server address.
  address: yourmysqlport:3306

  # Database name, username and password.
  database: 'yourmysqldatabasename'
  username: 'yourmysqlusername'
  password: 'yourmysqlpassword'

  table_prefix: 'litebans_'
```

**Step 4:** Enable any settings which allow punishments to sync. *(Make sure to set the server name if the plugin allows)*

{% hint style="info" %}
The below example config.yml is from LiteBans, though most plugins will have a related section if it supports sync.
{% endhint %}

```
# If this option is enabled and the server is connected to a remote database (e.g. MySQL),
# LiteBans will synchronize across all servers connected to that database with sync enabled.
sync: true

# If enabled, broadcasts will be synchronized.
sync_broadcasts: true

# If enabled, notifications will be synchronized.
sync_notifications: true

# If enabled, dupeip notifications will be synchronized.
# This will appear multiple times if a player joins multiple servers, so you might want to leave this disabled.
sync_dupeip_notifications: false

# The server name is an identifier used in cross-server synchronization.
# It represents a single plugin instance (or group of instances) and can be updated at any time.
# If you need per-server bans, you have to change server_name on all instances
# The "$serverScope" and "$serverOrigin" variables can be used in messages.
# Maximum length is 32 characters.
server_name: 'litebans'
```

**Step 5:** Repeat the process on every **SPIGOT** server, if you had your punishment plugin on bungeecord you must remove it.&#x20;

**You can now use PunishmentGUI and your punishment plugin on your network!**<br>

{% hint style="warning" %}
Please note, this will only sync punishments, **PunishmentGUI** does not support sync of its configuration, so you must edit each server individually, or copy + paste your created PunishmentGUI config to each **SPIGOT** server.
{% endhint %}


---

# 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://punishmentgui.bghddevelopment.com/bungeecord-network-setup.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.
