MineFlow - n8n Integration Plugin
MineFlow is a powerful Minecraft plugin that seamlessly integrates your Bukkit/Paper server with n8n automation workflows via HTTP webhooks. Send real-time game events to your n8n instance and automate your server management, notifications, analytics, and more!
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Features
• Real-time Event Monitoring - Track important server events as they happen
• n8n Integration - Send events directly to your n8n webhook endpoints
• Fully Configurable - Enable or disable individual events
• Lightweight & Performant - Minimal server impact with efficient HTTP requests
• Detailed Event Data - Rich JSON payloads with player, location, and context information
• API Key Authentication - Secure webhook communication
• Debug Mode - Troubleshoot webhook issues with detailed logging
Supported Events
• Player Join - Track when players connect to your server
• Player Quit - Monitor when players disconnect
• Player Chat - Capture all chat messages
• Player Death - Get detailed death information including killer data
• Block Break - Monitor block breaking activities
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Requirements
• Minecraft Server: Paper 1.21.1 or compatible (Bukkit/Spigot)
• Java: Version 21 or higher
• n8n: A running n8n instance with webhook endpoints configured
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Installation
1. Download MineFlow-1.0-SNAPSHOT.jar from the resources section
2. Place the JAR file in your server's plugins/ folder
3. Start or restart your Minecraft server
4. The plugin will generate a config.yml file automatically
5. Edit plugins/MineFlow/config.yml with your n8n webhook URL and settings
6. Reload the server or use /mineflow reload (if implemented)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Configuration
After first run, configure the plugin by editing plugins/MineFlow/config.yml:
Code (YAML):
webhooks:
enabled
: true
url
:
"http://localhost:5678/webhook-test/your-webhook-id"
apiKey
:
"your-api-key-here"
events:
playerJoin
: true
playerQuit
: true
blockBreak
: true
death
: true
chat
: true
debug
: true
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Event Payload Structure
All events are sent as JSON POST requests to your configured webhook URL with the following structure:
Code (Text):
{
"type": "event_type",
"timestamp": 1234567890123,
"payload": {
// Event-specific data
}
}
Player Join Event
Event Type: player_join
{
"type": "player_join",
"timestamp": 1234567890123,
"payload": {
"player": {
"name": "Steve",
"uuid": "8667ba71-b85a-4004-af54-457fa973fefe",
"world": "world",
"x": 0.5,
"y": 64.0,
"z": 0.5
}
}
}
Player Quit Event
Event Type: player_quit
{
"type": "player_quit",
"timestamp": 1234567890123,
"payload": {
"player": {
"name": "Steve",
"uuid": "8667ba71-b85a-4004-af54-457fa973fefe",
"world": "world",
"x": 0.5,
"y": 64.0,
"z": 0.5
}
}
}
Player Chat Event
Event Type: player_chat
{
"type": "player_chat",
"timestamp": 1234567890123,
"payload": {
"player": {
"name": "Steve",
"uuid": "8667ba71-b85a-4004-af54-457fa973fefe",
"world": "world"
},
"message": "Hello, everyone!"
}
}
Player Death Event
Event Type: player_death
{
"type": "player_death",
"timestamp": 1234567890123,
"payload": {
"player": {
"name": "Steve",
"uuid": "8667ba71-b85a-4004-af54-457fa973fefe",
"world": "world",
"x": 0.5,
"y": 64.0,
"z": 0.5,
"ping": 50,
"exp": 0.5,
"level": 10
},
"reason": "Steve was slain by Zombie",
"killer": {
"name": "Alex",
"health": 20.0,
"level": 15,
"exp": 0.3,
"ping": 45
},
"last_damage_cause": "ENTITY_ATTACK"
}
}
Note: The killer field will be null if the player was not killed by another player (e.g., environmental damage, mobs, etc.).
Block Break Event
Event Type: player_block_break
{
"type": "player_block_break",
"timestamp": 1234567890123,
"payload": {
"player": {
"name": "Steve",
"uuid": "8667ba71-b85a-4004-af54-457fa973fefe",
"world": "world",
"x": 0.5,
"y": 64.0,
"z": 0.5
},
"block": {
"name": "STONE",
"world": "world",
"x": 0,
"y": 64,
"z": 0
}
}
}
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
n8n Integration Guide
Setting Up n8n Webhook
1. Create a new workflow in your n8n instance
2. Add a Webhook node to your workflow
3. Configure the webhook:
• Method: POST
• Response Mode: Last Node
• Authentication: None (or use the API key in your workflow)
4. Copy the webhook URL from n8n
5. Paste it into your config.yml under webhooks.url
6. Set your API key in webhooks.apiKey (optional but recommended)
7. Save and activate your n8n workflow
Example n8n Workflow
Webhook (Receive Events)
↓
IF Node (Filter by event.type)
↓
Switch Node (Route by event type)
├─→ Process Player Join
├─→ Process Player Chat
├─→ Process Player Death
└─→ Process Block Break
↓
Send Notification / Update Database / Trigger Actions
Use Cases
• Analytics - Track player activity and server statistics
• Notifications - Send Discord/Slack alerts for important events
• Database Logging - Store events in MySQL, PostgreSQL, or MongoDB
• Automation - Trigger automated responses based on game events
• Monitoring - Monitor server health and player behavior
• Security - Detect suspicious activities and block breaking patterns
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Troubleshooting
Webhooks Not Sending
1. Check webhooks.enabled is set to true in config.yml
2. Verify the webhook URL is correct and accessible
3. Enable debug mode (debug: true) to see detailed logs
4. Check server console for error messages
5. Test the webhook URL manually with a tool like Postman or curl
Events Not Triggering
1. Verify the event is enabled in config.yml (e.g., events.playerJoin: true)
2. Check that webhooks are enabled globally
3. Review server logs for any plugin errors
4. Ensure your server version is compatible (Paper 1.21.1+)
Connection Timeouts
• The plugin uses a 3-second connection timeout and 5-second read timeout
• If your n8n instance is slow to respond, consider optimizing your workflow
• Check network connectivity between your server and n8n instance
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Technical Details
• API Version: Paper 1.21.1
• Java Version: 21
• Dependencies:
• Jackson Databind 2.17.0 (JSON serialization)
• Paper API 1.21.1
• HTTP Timeouts: 3s connect, 5s read
• Thread Safety: All webhook requests are sent asynchronously
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Support
• Questions: Ask in the discussion section
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Author
iFedeFC
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Reviews & Ratings
If you find this plugin useful, please consider leaving a positive review and rating! Your feedback helps improve the plugin and supports future development.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Future Plans
• Additional event types (player move, item pickup, etc.)
• Rate limiting for webhook requests
• Multiple webhook endpoints
• Event filtering by player permissions
• Webhook retry mechanism
• Metrics and statistics dashboard
• PlaceholderAPI integration
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Thank you for using MineFlow!