# Installation (Spigot)

<p class="callout info">This documentation is for v2 version, unfortunately v1 is no longer maintained.</p>

Download the latest release from [SpigotMC](https://www.spigotmc.org/resources/enhanced-glist-bungeecord-velocity.53295/) or from our [CI Server](https://ci.wirlie.net/job/Enhanced-Glist/job/master/lastSuccessfulBuild/) to download an unstable build if you want to contribute to this project! By testing an unstable build and reporting any bug you can help us a lot.

### **Spigot version is required?**

**NO**, Spigot version is an optional version of EnhancedGlist that you should install on all of your Spigot servers if you want to show AFK and Vanished players to `/glist` and `/slist` commands. Also you must have a [compatible plugin](https://docs.wirlie.net/books/eglist-velocity-bungeecord/page/compatible-plugins "Compatible Plugins") installed on your Spigot server to handle AFK and Vanish updates.

<p class="callout info">Some vanish plugins like **PremiumVanish** already brings compatibility with Bungeecord and Velocity, so in such case you do not require to install the Spigot version of EnhancedGlist.</p>

### **Spigot version can work without BungeeCord/Velocity version?**

**NO**, Spigot version only acts a communication bridge between Spigot and Proxy to send AFK and Vanish updates to BungeeCord/Velocity using an internal messaging system called "plugin messages", you must have the version of EnhancedGlist installed on your proxy to handle these updates properly.

<div drawio-diagram="16"><img src="https://docs.wirlie.net/uploads/images/drawio/2022-09/8kPKtJkq2aBeGZnr-drawing-1-1663856666.png" alt=""/></div>

### **Prerequisites**

- Java 8 or greater is required to run EnhancedGlis for Spigot.
- Reload the plugin using `/egls reload` command, never reload the plugin using a plugin manager!!
- Compatible Minecraft Versions: 1.8 to latest (1.19.X)

### **Installation steps**

1. Download latest stable or unstable build from our [CI Server](https://ci.wirlie.net/job/Enhanced-Glist/) or from [SpigotMC](https://www.spigotmc.org/resources/enhanced-glist-bungeecord-velocity.53295/).
2. Put downloaded file (`EnhancedGlist-Spigot-Bridge-X.X.X.jar`) inside `/plugins` folder.
3. Load plugin using a plugin manager, or start/restart your Spigot server.
4. Go to `/plugins/EnhancedGlistBridge` folder and edit configuration files to configure EnhancedGlist.
5. If you have made changes, use `/egls reload` command to reload plugin. 
    - **Note:** plugin manager is not required to reload EnhancedGlist because EnhancedGlist already does a full reload by using `/egls reload` command. We recommend you to use `/egls reload` to do a safe reload.
6. Congragulations! EnhancedGlist is installed on your Spigot server.

### **Configure how EnhancedGlist should communicate between Spigot and Proxy servers**

---

#### **Plugin Messages**

<div drawio-diagram="8"><img src="https://docs.wirlie.net/uploads/images/drawio/2022-09/m3eq7WMlKFQZ1yNq-drawing-1-1663561223.png" alt=""/></div>

Plugin messages is a basic communication system integrated within Spigot and BungeeCord/Velocity to send and receive messages between server and proxy using a player connection.

<p class="callout danger">**<span style="color: rgb(224, 62, 45);">The disadvantage of this system is the compatibility between MC versions, legacy clients such MC 1.8 will be unable to send messages to the Proxy at some situations.</span>**</p>

<p class="callout warning">We strongly recommend you to use another communication system such RabbitMQ or Redis to prevent inconsistencies.</p>

To enable this type of communication edit your `config.conf` file from EnhancedGlist folder and configure this property:

```yaml
communication{
  type="plugin-messages"
  ...
  ...
}
```

<p class="callout warning">Do not forget to modify the communication type of the EnhancedGlist located in your BungeeCord/Velocity instance!! The Spigot server and the Proxy server must have the same communication type, otherwise EnhancedGlist will be unable to made a success comunication.</p>

---

#### **RabbitMQ**

<div drawio-diagram="11"><img src="https://docs.wirlie.net/uploads/images/drawio/2022-09/YhAMVJv6YYI6UFnx-drawing-1-1663561527.png" alt=""/></div>

RabbitMQ is a message broker that you must install on your machine in order to use this type of communication, to install RabbitMQ follow [download instructions](https://www.rabbitmq.com/download.html) at RabbitMQ webpage.

To enable this communication type and configure RabbitMQ edit your `config.conf` file from EnhancedGlist folder and configure these properties:

```yaml
communication{
  type="rabbitmq"
  rabbitmq-server {
    host="localhost" # Set the host where RabbitMQ is installed
    port=5672 # By default RabbitMQ will listen to 5672 port
    user="guest" # Set the RabbitMQ user to use
    password="guest" # Set the password to use for authentication
  }
  ...
}
```

<p class="callout warning">Do not forget to modify the communication type of the EnhancedGlist located in your BungeeCord/Velocity instance!! The Spigot server and the Proxy server must have the same communication type, otherwise EnhancedGlist will be unable to made a success comunication.</p>

---

#### **Redis**

<div drawio-diagram="12"><img src="https://docs.wirlie.net/uploads/images/drawio/2022-09/pGHt0FSoYW8nxaCP-drawing-1-1663561546.png" alt=""/></div>

Redis is an in-memory data store that also acts as a message broker, to use Redis you must install it in your machine, follow the [Getting Started](https://redis.io/docs/getting-started/) guide to install Redis.

To enable this communication type and configure Redis edit your `config.conf` file from EnhancedGlist folder and configure these properties:

```yaml
communication{
  type="redis"
  redis-server {
    host="localhost" # Set the host where Redis is installed
    port=6379 # By default Redis will listen to 6379 port
    user="" # User to use, leave as empty to not use this property
    password="" # Password to use, leave as empty if your redis server does not require authentication
  }
  ...
}
```

<p class="callout warning">Do not forget to modify the communication type of the EnhancedGlist located in your BungeeCord/Velocity instance!! The Spigot server and the Proxy server must have the same communication type, otherwise EnhancedGlist will be unable to made a success comunication.</p>