Discord_Integration
PluginLicenseRef-All-Rights-Reserved

Discord_Integration

This project add a discord integration on a minecraft serveur.

28
Downloads
0
Followers
2 months ago
Updated
📦
2
Versions

📖About Discord_Integration

📊 DiscordStats — Discord Bot Embedded in Your Server

DiscordStats embeds a fully functional Discord bot directly into your Folia/Paper plugin. Drop a single .jar into your plugins/ folder — no Node.js, no secondary HTTP server, no separate script to run.


📋 Description

DiscordStats bridges your Minecraft server and your Discord community in the simplest way possible. All data is read live from Bukkit on every command — nothing is stored in memory between calls. Your players and admins can query the server directly from Discord using three slash commands, at any time, without ever opening the game.

The plugin uses JDA 5 (Java Discord API) bundled into the jar via Maven Shade. Communication between the JDA thread and Folia's main thread is handled through a CompletableFuture with a configurable timeout, preventing any silent deadlock.


✨ Features

  • 🤖 Embedded Discord bot — fully self-contained, no external runtime needed
  • 📡 Live data — all stats are fetched directly from Bukkit on every request
  • Folia-safe — uses GlobalRegionScheduler, no thread violations
  • 🔁 Slash commands registered automatically on startup
  • 👤 Offline player stats supported — no need to be online
  • 📈 TPS reported over 1min, 5min, 15min
  • 🔄 Hot reload via /dstats reload — no restart needed
  • 🎨 Adventure API — no deprecated ChatColor
  • 💬 Rich colored Discord embeds
  • ⏱️ 5s timeout if the server is under load — no silent freeze

💬 Discord Slash Commands

Command Description
/server TPS, memory usage, uptime and world info
/players Online players list with world and ping
/stats <player> Full stats for any player, online or offline

📜 In-game Commands

Command Description
/dstats reload Hot reload the plugin configuration

⚙️ Configuration

discord:
  token: ""               # Your Discord bot token
  guild-id: ""            # Your Discord server ID
  timeout: 5              # Timeout in seconds for Bukkit thread calls

Setup:

  1. Go to discord.dev/applications and create a new application
  2. Add a bot, enable the required intents, and copy the token
  3. Paste the token and your guild ID in config.yml
  4. Restart or run /dstats reload
  5. Slash commands will register automatically

🖥️ Compatibility

Platform Version
Paper 1.21.x
Folia 1.21.x
Java 21+
API Paper API 1.21.1-R0.1-SNAPSHOT

📦 Installation

  1. Download the plugin
  2. Place it in your server's plugins/ folder
  3. Restart the server
  4. Configure plugins/DiscordStats/config.yml with your bot token and guild ID
  5. Slash commands are registered automatically — no manual setup needed