# Reports

Reports is a feature in SporeCore that allows players to report other players directly in-game. Staff members can review, accept, deny, and manage reports efficiently, helping keep the server fair and safe.

Reports are stored temporarily and automatically cleaned up after a configurable amount of time.

***

## 📘 Config

You can configure the report system in `config.yml`. This controls how long reports are stored, cooldowns, notifications, and how reports behave when handled.

#### 🗂️ Report Storage

* **deletion**\
  How long an unhandled report is kept before being automatically deleted.\
  Example: `2d` = 2 days
* **completedDeletion**\
  How long a report stays in the system after it has been completed (accepted or denied).\
  Example: `12h` = 12 hours

***

## 🔔 Player Notifications

* **notifyReporter**\
  Message sent to the reporter once their report has been completed.\
  Leave empty if you don’t want to notify the reporter.
* **tresHoldMessage**\
  Notification sent to staff when a player has been reported multiple times in a short period.\
  This helps highlight potentially serious or repeated issues.

  Placeholders:

  * `%player%` → Reported player
  * `%count%` → Number of reports in the last 10 minutes

***

## &#x20;🛠️ Staff Actions

When a staff member reviews a report, they can either accept or deny it.

* **reportAccepted**\
  Message sent when a report is accepted.
* **reportDenied**\
  Message sent when a report is denied.

Placeholders:

* `%staff%` → Staff member handling the report
* `%target%` → Player that was reported

***

## 📬 New Report Notifications (Staff)

When a new report is created, online staff receive a detailed notification.

The message supports the following placeholders:

* `%reporter%` → Player who made the report
* `%player%` → Player being reported
* `%reason%` → Report reason
* `%type%` → Report type
* `%evidence%` → Whether evidence was provided (yes / no)

You can also use interactive buttons:

* **\[Click to manage]** → Opens the report list menu
* **\[Click to view evidence]** → Opens the provided evidence (if any)

The button color can be configured using `buttonColor`.\
Only named colors are supported (for example: `YELLOW`, `GREEN`, `RED`).

***

## 🔄 Re-Opening Reports

Staff can re-open completed reports if needed.

* **reportReOpened**\
  Notification sent to staff when a report is re-opened.
* **reportReOpenedPlayer**\
  Message sent to the player who originally made the report.

***

## ⏱️ Cooldowns & Spam Protection

To prevent abuse, the report system includes multiple cooldowns:

* **reportCooldown**\
  Time (in seconds) before a player can create another report.
* **sameTargetCooldown**\
  How long a player must wait before reporting the same target again.\
  Example: `1d` = 1 day

***

## 📎 Evidence

* **evidence**\
  If enabled, players can attach evidence (such as links) when creating a report.

***

### 📝 Report Reasons

You can define preset reasons players can choose from when reporting.

Each reason is written as:

```
Reason|type
```

Available types:

* `cheating`
* `chat`
* `other`

Example:

* `X-Ray|cheating`
* `Spamming|chat`
* **allowCustom**\
  If enabled, players can write their own custom reason instead of choosing a preset.

***

## ⚖️ Punishment Integration

* **openPunish**\
  If enabled, accepting a report will automatically open the punish menu for the reported player.\
  This allows staff to act immediately without running extra commands.
