|
| 1 | +# Connect Notify |
| 2 | + |
| 3 | +**Discord notifications for your Minekube Connect server status.** |
| 4 | + |
| 5 | +Let your friends know when your local Minecraft server is up and ready to join! This plugin sends a Discord webhook message when your server starts or stops, including the Connect endpoint so players can easily connect. |
| 6 | + |
| 7 | +## Features |
| 8 | + |
| 9 | +- 🟢 **Online notifications** – Sends a message when your server starts |
| 10 | +- 🔴 **Offline notifications** – Sends a message when your server stops |
| 11 | +- 🔗 **Automatic endpoint** – Reads your endpoint from [Minekube Connect](https://connect.minekube.com) config |
| 12 | +- 🎨 **Rich embeds** – Beautiful Discord embed messages with customizable colors |
| 13 | +- 📢 **Multiple webhooks** – Notify multiple Discord channels or servers at once |
| 14 | +- ⚡ **Zero config required** – Just paste your Discord webhook URL(s) and go! |
| 15 | + |
| 16 | +## Requirements |
| 17 | + |
| 18 | +- Minecraft server running Spigot, Paper, or compatible forks (1.8+) |
| 19 | +- [Minekube Connect plugin](https://connect.minekube.com/guide/connectors/plugin) installed and configured |
| 20 | + |
| 21 | +## Installation |
| 22 | + |
| 23 | +1. Download the latest `ConnectNotify.jar` from [Releases](https://github.com/minekube/connect-notify/releases) |
| 24 | +2. Drop it into your server's `plugins/` folder |
| 25 | +3. Start your server once to generate the config |
| 26 | +4. Edit `plugins/ConnectNotify/config.yml` and paste your Discord webhook URL |
| 27 | +5. Restart your server – done! |
| 28 | + |
| 29 | +## Configuration |
| 30 | + |
| 31 | +```yaml |
| 32 | +# plugins/ConnectNotify/config.yml |
| 33 | + |
| 34 | +# Discord webhook notifications |
| 35 | +discord: |
| 36 | + # List of webhook URLs to send notifications to |
| 37 | + # Create one: Right-click channel > Edit Channel > Integrations > Webhooks |
| 38 | + webhooks: |
| 39 | + - 'https://discord.com/api/webhooks/...' |
| 40 | + # - 'https://discord.com/api/webhooks/...' # Add more webhooks here |
| 41 | + |
| 42 | + # Bot appearance (optional) |
| 43 | + username: 'Connect Notify' |
| 44 | + avatar-url: 'https://connect.minekube.com/img/logo.png' |
| 45 | + |
| 46 | +# Message settings |
| 47 | +messages: |
| 48 | + # Online message - sent when server starts |
| 49 | + online: |
| 50 | + enabled: true |
| 51 | + title: 'Server Online! 🟢' |
| 52 | + description: 'The server is now up and running.' |
| 53 | + color: '#00ff00' |
| 54 | + show-endpoint: true |
| 55 | + endpoint-text: 'Connect with: `{endpoint}`' |
| 56 | + |
| 57 | + # Offline message - sent when server stops |
| 58 | + offline: |
| 59 | + enabled: true |
| 60 | + title: 'Server Offline 🔴' |
| 61 | + description: 'The server has been shut down.' |
| 62 | + color: '#ff0000' |
| 63 | +``` |
| 64 | +
|
| 65 | +### Placeholders |
| 66 | +
|
| 67 | +| Placeholder | Description | |
| 68 | +| --------------- | --------------------------------------------------------------------- | |
| 69 | +| `{endpoint}` | Your Minekube Connect endpoint (e.g., `yourserver.play.minekube.net`) | |
| 70 | +| `{server-name}` | Your server name from Connect config | |
| 71 | +| `{players}` | Current online player count | |
| 72 | +| `{max-players}` | Maximum player slots | |
| 73 | + |
| 74 | +## Creating a Discord Webhook |
| 75 | + |
| 76 | +**Option A: Via Channel Settings (easiest)** |
| 77 | + |
| 78 | +1. Right-click the channel where you want notifications |
| 79 | +2. Click **Edit Channel** → **Integrations** → **Webhooks** |
| 80 | +3. Click **New Webhook** |
| 81 | +4. Copy the **Webhook URL** |
| 82 | + |
| 83 | +**Option B: Via Server Settings** |
| 84 | + |
| 85 | +1. Go to **Server Settings** → **Integrations** → **Webhooks** |
| 86 | +2. Click **New Webhook** |
| 87 | +3. Select the channel for notifications |
| 88 | +4. Copy the **Webhook URL** |
| 89 | + |
| 90 | +Then add the URL to `discord.webhooks` in `config.yml`. |
| 91 | + |
| 92 | +> **Tip:** You can add multiple webhooks to notify different channels or servers! |
| 93 | + |
| 94 | +## How It Works |
| 95 | + |
| 96 | +``` |
| 97 | +┌─────────────────────────────────────────────────────────────┐ |
| 98 | +│ Your Minecraft Server │ |
| 99 | +│ ┌─────────────────┐ ┌─────────────────────────────────┐ │ |
| 100 | +│ │ Minekube Connect│───▶│ Connect Notify (reads endpoint) │ │ |
| 101 | +│ │ config.yml │ └──────────────┬──────────────────┘ │ |
| 102 | +│ │ endpoint: xyz │ │ │ |
| 103 | +│ └─────────────────┘ │ HTTP POST │ |
| 104 | +└────────────────────────────────────────┼────────────────────┘ |
| 105 | + ▼ |
| 106 | + ┌──────────────────┐ |
| 107 | + │ Discord Webhooks │ |
| 108 | + │ #server-status │ |
| 109 | + │ #announcements │ |
| 110 | + │ ... │ |
| 111 | + └──────────────────┘ |
| 112 | +``` |
| 113 | +
|
| 114 | +## Example Discord Messages |
| 115 | +
|
| 116 | +**Online:** |
| 117 | +
|
| 118 | +> ### Server Online! 🟢 |
| 119 | +> |
| 120 | +> The server is now up and running. |
| 121 | +> |
| 122 | +> Connect with: `myserver.play.minekube.net` |
| 123 | +
|
| 124 | +**Offline:** |
| 125 | +
|
| 126 | +> ### Server Offline 🔴 |
| 127 | +> |
| 128 | +> The server has been shut down. |
| 129 | +
|
| 130 | +## Troubleshooting |
| 131 | +
|
| 132 | +### No messages in Discord? |
| 133 | +
|
| 134 | +1. Check that your webhook URLs are correct under `discord.webhooks` in `config.yml` |
| 135 | +2. Make sure the webhook(s) haven't been deleted in Discord |
| 136 | +3. Check server console for error messages |
| 137 | +4. Verify Minekube Connect is loaded and has a valid endpoint |
| 138 | +
|
| 139 | +### Wrong endpoint showing? |
| 140 | +
|
| 141 | +The plugin reads from `plugins/connect/config.yml`. Make sure Connect is properly configured and your endpoint is set. |
| 142 | +
|
| 143 | +## Building from Source |
| 144 | +
|
| 145 | +```bash |
| 146 | +git clone https://github.com/minekube/connect-notify.git |
| 147 | +cd connect-notify |
| 148 | +./gradlew build |
| 149 | +``` |
| 150 | + |
| 151 | +The built jar will be in `build/libs/`. |
| 152 | + |
| 153 | +## License |
| 154 | + |
| 155 | +MIT License – See [LICENSE](LICENSE) for details. |
| 156 | + |
| 157 | +## Links |
| 158 | + |
| 159 | +- [Minekube Connect](https://connect.minekube.com) – Free public addresses for your Minecraft server |
| 160 | +- [Discord Webhooks Guide](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks) |
| 161 | +- [Report Issues](https://github.com/minekube/connect-notify/issues) |
| 162 | + |
| 163 | +--- |
| 164 | + |
| 165 | +<p align="center"> |
| 166 | + Made with ❤️ by <a href="https://minekube.com">Minekube</a> |
| 167 | +</p> |
0 commit comments