Compatibility
Minecraft: Java Edition
Platforms
Links
Tags
Creators
Details
DiscordGate
Gate your Minecraft server behind Discord. Only linked players can join.
Integrates directly with BaxiBot. No extra website, no extra setup.
How it works
- A player tries to join your server
- They get kicked with a short code
- They type
/mc link \<code>in your Discord server - BaxiBot verifies the code and whitelists them
- They can now join permanently
Features
- Discord-gated whitelist: unlinked players can't join, period
- BaxiBot integration: configure everything from the Baxi dashboard
- Bedrock / Geyser compatible: Floodgate UUIDs work out of the box
- In-game commands:
/dgto check status or get a new code,/dgunlinkto unlink - Welcome message: greets players on first join after linking, showing their Discord name
- Per-server config: each Discord server manages its own MC server independently
- Announce channel: optionally post a message when someone links
- Auto role: assign a role on link, remove it on unlink
- DM on link: optionally notify the user when linking succeeds
- Self-unlink toggle: choose whether players can unlink themselves or require admin action
- MC ↔ Discord cross-chat: two-way chat bridge using linked identities — MC
players post in Discord under their own Discord display name + avatar (via
webhook, with
· MCsuffix), Discord messages from linked users show in-game as\[DC] \<mc_name> (\<discord_name>): …. Unlinked Discord users are dropped silently. Configure the bridge channel + webhook in the BaxiBot dashboard. - Velocity support: standalone proxy plugin — own storage + HTTP API, no Paper backend needed
Commands
In-game
| Command | Permission | Description |
|---|---|---|
/dg |
dg.use (default: all) |
Show link status / get your link code |
/dg unlink |
dg.use (default: all) |
Unlink your Discord account |
/dg announce \<message> |
dg.admin (default: op) |
Broadcast in-game only |
/dg announce --discord \<message> |
dg.admin (default: op) |
Broadcast in-game and to Discord |
/dg reload |
dg.admin (default: op) |
Reload config.yml |
/dg lock |
dg.admin (default: op) |
Block new account links |
/dg unlock |
dg.admin (default: op) |
Allow new account links |
/dg admin link \<player> \<discord_id> |
dg.admin (default: op) |
Manually link a player |
/dg admin unlink \<player> |
dg.admin (default: op) |
Manually unlink a player |
Alias: /dglink
Discord (via BaxiBot)
| Command | Description |
|---|---|
/mc link \<code> |
Link your Minecraft account |
/mc unlink |
Unlink your account |
/mc status |
Show your linked account |
/mc admin unlink \<user> |
Force-unlink a Discord user (requires Manage Server) |
/mc admin lookup \<user> |
Look up a user's linked MC account (requires Manage Server) |
Setup
Paper (standalone or backend)
- Drop
DiscordGate-{version}-1.21.jarinto yourplugins/folder and start the server. - Edit
plugins/DiscordGate/config.yml:
port: 4321
bind-address: "0.0.0.0" # use 127.0.0.1 if BaxiBot and Velocity run on the same machine
secret: "your-secret-here"
- Make sure port
4321is reachable from the machine running BaxiBot (and Velocity, if used).
BaxiBot Dashboard
- Open the Baxi Dashboard for your server
- Go to MC Link
- Enter your server's API URL (e.g.
http://your-server-ip:4321) and secret - Enable and save
Velocity (standalone — recommended for networks)
The Velocity plugin is fully standalone: it manages its own storage and runs its own HTTP API. BaxiBot connects directly to Velocity — no Paper plugin needed on backend servers.
[ BaxiBot ] ──→ [ Velocity :4321 ] ──→ [ Survival backend ]
(API + storage) ──→ [ Creative backend ]
(gates players) ──→ [ Hub backend ]
- Drop
DiscordGate-velocity-{version}.jarinto your Velocityplugins/folder. - Start Velocity once. A config file is generated at
plugins/discordgate/config.properties. - Edit the config:
# HTTP API port — point BaxiBot at this server's IP and this port
port=4321
bind-address=0.0.0.0
# Shared secret — enter this same value in the BaxiBot dashboard
secret=your-secret-here
# Kick message shown to unlinked players ({token} = link code)
kick-message=<red><bold>Discord account not linked!</bold></red>\n<gray>Join our Discord and type:</gray>\n<gold><bold>/mc link {token}</bold></gold>\n<dark_gray>This code expires in 10 minutes.</dark_gray>
token-ttl-minutes=10
- Restart Velocity.
- In the BaxiBot dashboard, set the API URL to
http://your-velocity-ip:4321(not your Paper backend).
Backend servers: disable the vanilla whitelist (
white-list=falseinserver.properties) on all backends — Velocity is the gate. Backends should not be directly reachable from the internet.
Cross-chat in a Velocity network
Cross-chat needs both the Velocity plugin and the Paper plugin installed. The two plugins handle different directions:
- MC → Discord (outbound) is captured by the Paper plugin on each backend
(via
AsyncChatEvent). Each backend POSTs the message directly to BaxiBot's/dg/chat-out. Velocity'sPlayerChatEventis unreliable on signed chat (1.19.1+), so Velocity stays silent on outbound. - Discord → MC (inbound) is delivered by BaxiBot to a single URL — pointed at Velocity. Velocity then broadcasts the message to every player on every backend in one call. No per-backend fan-out, no Paper involvement on this path.
This means the shared secret must match across all three places: every Paper
backend's secret, the Velocity secret, and the BaxiBot dashboard's API
secret. BaxiBot uses that secret to authenticate inbound POSTs from any Paper
backend, and to authorise its own outbound POSTs to Velocity.
Step-by-step setup
Assumed prerequisite: regular DiscordGate is already working (players can /mc link and join). You're only adding chat now.
1. Create a Discord webhook for the bridge channel
In Discord:
- Open the channel you want to use as the chat bridge → Edit Channel → ** Integrations** → Webhooks → New Webhook.
- Name it whatever you like (it gets overridden per-message anyway). Click Copy Webhook URL — you'll paste this into the BaxiBot dashboard in step 4.
2. Configure every Paper backend
For each backend server, edit plugins/DiscordGate/config.yml:
# Already present from the basic setup — leave as-is:
secret: "your-shared-secret"
bot-api-url: "https://baxi.avocloud.net" # or your self-hosted BaxiBot URL
# New cross-chat keys:
chat-bridge-enabled: true
chat-relay-source: "paper" # this backend captures chat for relay
chat-format-dc-to-mc: "<gray>[DC]</gray> <white>{mc_name}</white> <dark_gray>({discord_name})</dark_gray><gray>:</gray> <white>{message}</white>"
Then run /dg reload in-game (or restart the backend). Repeat on every backend.
3. Configure the Velocity proxy
Edit plugins/discordgate/config.properties on the proxy:
# Already present:
secret=your-shared-secret
# New cross-chat keys:
chat-bridge-enabled=true
chat-relay-source=paper
chat-format-dc-to-mc=<gray>[DC]</gray> <white>{mc_name}</white> <dark_gray>({discord_name})</dark_gray><gray>:</gray> <white>{message}</white>
chat-relay-source=paper here is critical: it tells the Velocity plugin not
to also relay outbound chat. Without it every MC message would be sent to
Discord twice (once by Paper, once by Velocity).
Restart Velocity.
4. Configure the BaxiBot dashboard
Open the Baxi dashboard → MC Link for the right Discord server.
Confirm the existing fields:
- API URL points at Velocity (e.g.
http://your-velocity-ip:4321), not at any Paper backend. This is what Velocity-network setups already require — it's how inbound messages reach all backends in one call. - API Secret matches the value you put in Paper + Velocity configs.
Scroll to the new Cross-chat section:
- Toggle Enable MC ↔ Discord cross-chat on.
- Pick the bridge channel from the dropdown.
- Paste the webhook URL you copied in step 1.
- Click Save.
Verification
- Join the network and type
helloin chat. Within ~1s a webhook message should appear in the bridge channel under your Discord display name +· MC (\<your-mc-name>)suffix. - From Discord, post
hiin the bridge channel. Every player on every backend should see\[DC] \<your-mc-name> (\<your-discord-name>): hi. - Post in the channel from a Discord account that is not linked. Nothing should appear in MC (silent drop is by design).
Troubleshooting
- MC chat doesn't reach Discord — check the Paper backend log for
\[dg chat-out] Bot responded …. If you see a 401, secrets don't match. If there's no log line at all,chat-bridge-enabledis false or the player isn't linked. Unlinked players are not relayed. - Discord chat doesn't reach MC — check Velocity's log for any
/dg/chat-inrequest line. If BaxiBot's API URL still points at a Paper backend, the inbound POST goes to that backend and only its players see it. Repoint the dashboard's API URL at Velocity. - Every MC message appears twice in Discord — Velocity is also relaying. Set
chat-relay-source=paperinconfig.propertiesand restart. - Webhook posts as "Wumpus" / generic name — the linked Discord user is no longer in the guild (BaxiBot can't fetch their member object). The fallback uses the MC name. Re-invite them or unlink/relink.
Requirements
- Paper 1.21.1+ or Velocity 3.3+ (with Paper 1.21.1+ backend)
- BaxiBot added to your Discord server
config.yml (Paper)
port: 4321
bind-address: "0.0.0.0"
secret: "CHANGE-ME"
kick-message: |
<red><bold>Discord account not linked!</bold></red>
<newline>
<gray>Join our Discord and type:</gray>
<newline>
<gold><bold>/mc link {code}</bold></gold>
<newline>
<dark_gray>This code expires in 10 minutes.</dark_gray>
token-ttl-minutes: 10
welcome-message-enabled: true
welcome-message: "<green>Welcome, <white><bold>{player}</bold></white>! Your Discord account <aqua>{discord_name}</aqua> is linked."
allow-self-unlink: true
# ── Cross-chat (MC ↔ Discord) ─────────────────────────────────────────────
chat-bridge-enabled: true
# Which side captures MC chat to forward to Discord — only relevant when both
# the Paper plugin AND the Velocity plugin are deployed in the same network.
# One of: "paper", "velocity".
chat-relay-source: "paper"
# MiniMessage template for Discord→MC. Tokens: {mc_name} {discord_name} {message}
# Token values are escaped before substitution so Discord users can't inject tags.
chat-format-dc-to-mc: "<gray>[DC]</gray> <white>{mc_name}</white> <dark_gray>({discord_name})</dark_gray><gray>:</gray> <white>{message}</white>"
All messages support MiniMessage formatting.
The bridge channel and webhook URL are set per-Discord-server in the BaxiBot dashboard → MC Link → Cross-chat section.


