# Accessing the API

### Getting the EGlow/EGlowAPI instance

Here's how to get the instances:\
eGlow : `EGlow.getInstance();`

eGlowAPI: `EGlow.getAPI();` (This is the main one you'll be using)

### Events

`GlowColorChangeEvent` : Called whenever the glow color changes.

### EGlowAPI Methods

`getEGlowPlayer(Player)` :  Get the EGlowPlayer instance.

`getEGlowPlayer(UUID)` : Get the EGlowPlayer instance.

`getEGlowEffect(String)` : Get any EGlowEffect instance using the effect name. For default ones you can use the EGlowColor, EGlowBlink and EGlowEffect enums followed by the `toString()`.

`getGlowColor(EGlowPlayer)` : Get the glow color (invisible).

`enableGlow(EGlowPlayer, EGlowEffect)` : Enable a glow for the given EGlowPlayer using an EGlowEffect instance.

`enableGlow(EGlowPlayer, EGlowColor)` : Enable a glow for the given EGlowPlayer using an EGlowColor enum.

`enableGlow(EGlowPlayer, EGlowBlink)` : Enable a glow for the given EGlowPlayer using an EGlowBlink enum.

`enableGlow(EGlowPlayer, EGlowEffect)` : Enable a glow for the given EGlowPlayer using an EGlowEffect enum.

`disableGlow(EGlowPlayer)` : Disable the glow for the given EGlowPlayer.

`addCustomReceiver(EGlowPlayer, Player)` : Add a player who can see the glowing of the EGlowPlayer. (Using this for the first time will only show the glow to the EGlowPlayer and the Player, none else).

`removeCustomReceiver(EGlowPlayer, Player)` : Remove a player who can't see the glowing of the EGlowPlayer anymore (Must have been added before otherwise this won't do anything).

`setCustomReceivers(EGlowPlayer, List<Player>)`  : Add a list of Players who can see the glowing of the EGlowPlayer. (Other players not defined in this list won't be able to see the glow).

`resetCustomGlowReceivers(EGlowPlayer)` : Resets the CustomReceivers of the given EGlowPlayer allowing everyone to see their glow again.

`setSendTeamPackets(boolean)` : Set weather eGlow should be sending it's team packets. (Only use this if you know what you're doing!).

`setPacketBlockerStatus(boolean)` : Set weather eGlow should be blocking ('Fixing') team packets that would cause an incorrect glow color. (Only use this if you know what you're doing!).


---

# 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://eplugins.gitbook.io/eglow/developer-api/accessing-the-api.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.
