Discord Webhooks
CocoFFA can send events to Discord using webhooks. Configure them in plugins/CocoFFA/webhook.yml.
Supported Events
| Event | Description |
|---|---|
| win | Player wins an arena |
| join | Player joins an arena |
| leave | Player leaves an arena |
| start | Arena starts |
| stop | Arena stops |
| kill | Player is eliminated |
Configuration Example
plugins/CocoFFA/webhook.yml
win:
url: "https://discord.com/api/webhooks/YOUR_WEBHOOK_URL"
embed:
title: "🏆 Arena Victory"
description: |
**Victory Details:**
• Winner: `%player%`
• Arena: `%arena%`
• Kills: `%kills%`
🎉 Congratulations on your victory!
color: "#FFD700"
footer: "CocoFFA"
image: ""
thumbnail: ""
All Webhook Configurations
Win Webhook
win:
url: "https://discord.com/api/webhooks/URL"
embed:
title: "🏆 Arena Victory"
description: |
**Victory Details:**
• Winner: `%player%`
• Arena: `%arena%`
• Kills: `%kills%`
color: "#FFD700"
footer: "CocoFFA"
Join Webhook
join:
url: "https://discord.com/api/webhooks/URL"
embed:
title: "➕ Player Joined Arena"
description: |
**Join Details:**
• Player: `%player%`
• Arena: `%arena%`
• Players: `%current_players%/%max_players%`
color: "#00FF00"
footer: "CocoFFA"
Leave Webhook
leave:
url: "https://discord.com/api/webhooks/URL"
embed:
title: "➖ Player Left Arena"
description: |
• Player: `%player%`
• Arena: `%arena%`
• Players: `%current_players%/%max_players%`
color: "#FF0000"
footer: "CocoFFA"
Start Webhook
start:
url: "https://discord.com/api/webhooks/URL"
embed:
title: "🎮 Arena Started"
description: |
• Arena: `%arena%`
• Players: `%player_count%`
color: "#00FFFF"
footer: "CocoFFA"
Stop Webhook
stop:
url: "https://discord.com/api/webhooks/URL"
embed:
title: "🛑 Arena Stopped"
description: |
• Arena: `%arena%`
• Reason: `%reason%`
color: "#FFA500"
footer: "CocoFFA"
Kill Webhook
kill:
url: "https://discord.com/api/webhooks/URL"
embed:
title: "💀 Player Eliminated"
description: |
• Eliminated: `%victim%`
• Killer: `%killer%`
• Arena: `%arena%`
color: "#FF4500"
footer: "CocoFFA"
Placeholders
| Placeholder | Description |
|---|---|
| %player% | Player name |
| %arena% | Arena name |
| %kills% | Kill count |
| %current_players% | Current player count |
| %max_players% | Maximum players |
| %player_count% | Total players in arena |
| %victim% | Eliminated player |
| %killer% | Player who got the kill |
| %reason% | Stop reason |
Setup Guide
- Go to your Discord server settings
- Navigate to Integrations → Webhooks
- Click New Webhook
- Copy the webhook URL
- Paste the URL in
webhook.ymlfor the desired event - Reload the plugin:
/ffa reload