# 📡 Stream

It supports platform-based stream announcements, URL validation behavior depending on configuration, cooldowns, and platform-specific permissions.

***

### What It Does

The Stream module adds a proxy-side command for announcing streams to the network.

It can be used for:

* Player stream announcements
* Staff stream announcements
* Platform-based announcements
* Stream URL sharing
* Cooldown-controlled announcements
* Platform-specific permission control

***

### When To Enable It

Enable this module if you want players, content creators, staff members, or partners to announce live streams on your network.

This module is useful for:

* Community streamers
* Content creator ranks
* Partner programs
* Staff events
* Server events
* Network-wide stream promotion

***

### Requirements

The Stream module does not require external dependencies.

| Dependency     | Required | Purpose       |
| -------------- | -------- | ------------- |
| Redis          | No       | Not required. |
| MySQL          | No       | Not required. |
| MongoDB        | No       | Not required. |
| PacketEvents   | No       | Not required. |
| Discord        | No       | Not required. |
| PlaceholderAPI | No       | Not required. |

***

### Configuration File

The Stream module configuration file is located at:

```
plugins/NexusProxy/modules/stream/stream.yml
```

This file can contain settings for:

* Module status
* Command name
* Command aliases
* Permissions
* Platform settings
* Platform permissions
* Cooldowns
* Messages
* Announcement format
* URL behavior

{% hint style="warning" %}
Command names, aliases, supported platforms, permissions, and cooldowns may be configurable in the module file.

The commands shown here are the default commands.
{% endhint %}

***

### Default Command

| Command                    | Description                                             |
| -------------------------- | ------------------------------------------------------- |
| `/stream <platform> <url>` | Announces a stream using the selected platform and URL. |

***

### Permissions

| Permission                          | Description                                                     |
| ----------------------------------- | --------------------------------------------------------------- |
| `nexusproxy.command.stream`         | Allows usage of `/stream`.                                      |
| `nexusproxy.stream.cooldown.bypass` | Allows bypassing stream announcement cooldowns.                 |
| Platform permissions                | Allows usage of specific platforms, depending on configuration. |

{% hint style="info" %}
Platform permissions depend on your `stream.yml` configuration.
{% endhint %}

***

### Recommended LuckPerms Setup

#### Content creator rank

```
/lp group creator permission set nexusproxy.command.stream true
```

#### Staff

```
/lp group staff permission set nexusproxy.command.stream true
```

#### Admin cooldown bypass

```
/lp group admin permission set nexusproxy.stream.cooldown.bypass true
```

#### Example platform permission

```
/lp group creator permission set nexusproxy.stream.platform.twitch true
/lp group creator permission set nexusproxy.stream.platform.youtube true
```

{% hint style="warning" %}
The exact platform permission names depend on your module configuration.

Check `stream.yml` before assigning platform permissions.
{% endhint %}

***

### Command Usage

Basic format:

```
/stream <platform> <url>
```

Example:

```
/stream twitch https://twitch.tv/example
```

Another example:

```
/stream youtube https://youtube.com/@example/live
```

***

### Platforms

The Stream module can be configured with supported platforms.

Common platform examples may include:

* Twitch
* YouTube
* Kick
* TikTok
* Other configured platforms

Each platform can have its own settings depending on your configuration.

Example concept:

```yaml
platforms:
  twitch:
    enabled: true
    permission: "nexusproxy.stream.platform.twitch"

  youtube:
    enabled: true
    permission: "nexusproxy.stream.platform.youtube"
```

{% hint style="info" %}
Only document or advertise the platforms that are actually enabled in your `stream.yml`.
{% endhint %}

***

### Cooldowns

The Stream module can use cooldowns to prevent spam.

Cooldowns are useful when allowing players or creator ranks to announce streams.

Example concept:

```yaml
cooldown:
  enabled: true
  seconds: 300
```

Players with the bypass permission can ignore cooldowns:

```
nexusproxy.stream.cooldown.bypass
```

{% hint style="warning" %}
Do not give cooldown bypass to normal players unless you trust them.

Stream announcements can become spammy fast. Nadie quiere un Twitch ad simulator en el chat.
{% endhint %}

***

### Announcement Format

Stream announcements are configured in:

```
plugins/NexusProxy/modules/stream/stream.yml
```

The announcement format can usually include dynamic information such as:

* Player name
* Platform
* Stream URL
* Prefix
* Hover text
* Click actions
* Colors and formatting

Example concept:

```yaml
announcement:
  message:
    - "&d&lSTREAM &8» &f%player% is now live on &d%platform%&f!"
    - "&7Click here: &f%url%"
```

{% hint style="info" %}
Available placeholders depend on the module configuration and implementation.
{% endhint %}

***

### Common Use Cases

#### Announce a Twitch stream

```
/stream twitch https://twitch.tv/example
```

***

#### Announce a YouTube stream

```
/stream youtube https://youtube.com/@example/live
```

***

#### Give stream access to creators

```
/lp group creator permission set nexusproxy.command.stream true
```

***

#### Allow admins to bypass cooldown

```
/lp group admin permission set nexusproxy.stream.cooldown.bypass true
```

***

### Setup Tips

* Enable only the platforms you want to support.
* Use platform permissions to control who can announce each platform.
* Add cooldowns to prevent spam.
* Give stream access only to trusted groups, creators, partners, or staff.
* Review the announcement format before opening the command to players.
* Make sure URLs are displayed clearly.
* Check `stream.yml` if you want to change the command name or aliases.

***

### Common Issues

#### `/stream` does not work

Check that:

* The Stream module is enabled.
* The player has `nexusproxy.command.stream`.
* The command was not renamed in `stream.yml`.
* Another plugin is not overriding `/stream`.

***

#### Player cannot use a platform

Check that:

* The platform is enabled in `stream.yml`.
* The player has the required platform permission.
* The platform name is typed correctly.
* The module configuration uses the same platform name.

***

#### Stream announcement is blocked by cooldown

Check that:

* The player is not currently on cooldown.
* The cooldown duration is configured correctly.
* Staff or admins have `nexusproxy.stream.cooldown.bypass` if they should bypass cooldowns.

***

#### URL is not accepted

Check that:

* The URL format is valid.
* The platform matches the URL if your configuration validates it.
* The platform is enabled.
* The module configuration allows that URL pattern.

***

#### Announcement format looks wrong

Check that:

* The message format is configured correctly.
* Color codes or formatting tags are valid.
* Placeholders are typed correctly.
* The module was reloaded or the proxy was restarted after editing the config.

***

### Summary

The Stream module provides a simple way for players, creators, or staff to announce live streams from supported platforms.

It is recommended for networks that want to promote community content, creator ranks, staff streams, or server events through controlled stream announcements.


---

# 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://nexusproxy.nemesismc.net/modules/stream.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.
