Home›Java›Mods›Discord Velocity
Discord Velocity
ModsJava

Discord Velocity

Java mod listed for Minecraft 1.21–26.x. Downloads from the MC Java Mods app on Android.

by D-Volk · on Modrinth

⬇ Download on Modrinth

Discord Velocity

A Velocity plugin that bridges the proxy with a Discord server: player event relay, bidirectional chat, console log streaming, command execution from Discord, and playtime statistics.

Features

Requirements

Installation

  1. Download or build discord-velocity-<version>.jar.
  2. Place it in Velocity's plugins/ directory.
  3. Start the proxy — plugins/discord-velocity/config.yml and messages.yml are created.
  4. Fill in config.yml:
    • discord.token — bot token
    • discord.guild-id — guild ID (recommended; otherwise slash commands take up to 1 h to appear globally)
    • discord.chat-channel-id, discord.console-channel-id — channel IDs
    • statify.* — DB credentials and server list (only needed for /time)
  5. Restart the proxy.

Build from source

gradle wrapper --gradle-version 8.10
./gradlew clean shadowJar

Output: build/libs/discord-velocity-<version>.jar (fat-jar with JDA, SnakeYAML, MariaDB JDBC shaded).

Commands

Velocity

Command Description
/discord-velocity info Plugin version, bot status, channels, current presence.
/discord-velocity reload Reload config.yml and messages.yml without restart.
/dv ... Alias.

Discord slash commands

Command Where Description
/commands console channel Lists all proxy commands (ephemeral reply).
/players any channel Online players per server; optional server parameter with autocomplete.
/time any channel Playtime per server for a player. Requires statify.enabled: true.

Any plain message in the console channel is executed as a proxy console command. The / prefix is optional.

/players parameters

/time parameters

Configuration

config.yml

config-version: "0.2.0"           # set at build time — do not edit

discord:
  token: ""
  guild-id: ""
  chat-channel-id: ""
  console-channel-id: ""

chat:
  mc-to-discord: true              # forward player chat to Discord
  discord-to-mc: true              # forward Discord messages to MC

events:
  command-log: true                # log player commands to chat channel

console:
  bidirectional: true              # execute messages from console channel as commands
  flush-interval-ms: 1500          # log batching interval (ms)
  exclude-loggers:                 # skip loggers by prefix
    - net.dv8tion
    - okhttp3
    - io.netty

statify:
  enabled: false                   # enable /time slash command
  type: mariadb                    # mysql | mariadb
  host: localhost
  port: 3306
  database: statify
  username: statify
  password: change_me
  use-ssl: false
  servers:                         # server-name values from Statify's config.yml (display order)
    - lobby
    - survival

presence:
  mode: single                     # single | rotate | schedule
  type: PLAYING
  format: "%online%/%max% online"
  rotation-interval-sec: 30
  status:
    mode: auto                     # auto | manual
    manual: ONLINE
    active: ONLINE                 # when players > 0
    empty: IDLE                    # when players == 0
  list:
    - type: PLAYING
      text: "%online%/%max% players"
    - type: LISTENING
      text: "maintenance"
      status: DND
    - at: "20:00"
      type: STREAMING
      text: "Evening stream"
      url: "https://twitch.tv/example"

messages.yml

All texts sent by the plugin to Discord and MC. Placeholders: %player%, %displayname%, %server%, %role%, %from%, %to%, %message%, %command%, %count%.

Missing keys fall back to the bundled default — no message can be lost.

Config versioning

config-version and messages-version are injected at build time and must match the running plugin version.

On startup:

  1. File missing → created from bundled default.
  2. Legacy config.properties / messages.properties found → renamed to *.old.legacy.yml.
  3. Version mismatch → old file renamed to <name>.old.<version>.yml, fresh default created. Collisions get .1, .2 suffixes.

Data layout

plugins/
├── discord-velocity-0.2.0.jar
└── discord-velocity/
    ├── config.yml
    ├── messages.yml
    ├── config.old.0.1.0.yml
    └── messages.old.0.1.0.yml

Tech stack

JDA, SnakeYAML, and the MariaDB driver are shaded into ru.dvolk.discordvelocity.shaded.*.

Notes

Tested with Velocity 3.5.0 #605, Paper 1.21.11 #132, LuckPerms 5.5.57, and statify-paper 1.0.0.

License

MIT


Discord Velocity

Плагин для Velocity, связывающий прокси с Discord-сервером: трансляция событий и чата, стрим консоли, выполнение команд через Discord и статистика наигранного времени.

Возможности

Требования

Установка

  1. Скачайте или соберите discord-velocity-<version>.jar.
  2. Положите в plugins/ Velocity.
  3. Запустите прокси — создастся plugins/discord-velocity/ с config.yml и messages.yml.
  4. Заполните config.yml:
    • discord.token — токен бота
    • discord.guild-id — ID сервера (иначе slash-команды появятся до 1 ч)
    • discord.chat-channel-id, discord.console-channel-id — ID каналов
    • statify.* — данные БД и список серверов (только для /time)
  5. Перезапустите прокси.

Сборка из исходников

gradle wrapper --gradle-version 8.10
./gradlew clean shadowJar

Результат: build/libs/discord-velocity-<version>.jar.

Команды

Velocity

Команда Что делает
/discord-velocity info Версия, статус бота, каналы, текущий presence.
/discord-velocity reload Перечитать config.yml и messages.yml.
/dv ... Алиас.

Discord (slash-команды)

Команда Где работает Что делает
/commands console-канал Список команд прокси (ephemeral).
/players любой канал Онлайн-игроки по серверам; параметр server с автодополнением.
/time любой канал Наигранное время игрока. Требует statify.enabled: true.

Любое сообщение в console-канале выполняется как команда. Префикс / опционален.

Параметры /players: server (опционально) — фильтр по серверу с автодополнением из Velocity.

Параметры /time: player (обязательно), period (all/day/week/month/year/custom), from/to (DD.MM.YYYY или DD.MM.YY для custom).

Конфигурация

config.yml

config-version: "0.2.0"           # подставляется при сборке, не менять

discord:
  token: ""
  guild-id: ""
  chat-channel-id: ""
  console-channel-id: ""

chat:
  mc-to-discord: true              # чат игроков → Discord
  discord-to-mc: true              # Discord → MC

events:
  command-log: true                # логировать команды игроков

console:
  bidirectional: true              # выполнять команды из console-канала
  flush-interval-ms: 1500          # период склейки логов
  exclude-loggers:
    - net.dv8tion
    - okhttp3
    - io.netty

statify:
  enabled: false                   # true — включить /time
  type: mariadb                    # mysql | mariadb
  host: localhost
  port: 3306
  database: statify
  username: statify
  password: change_me
  use-ssl: false
  servers:                         # server-name из config.yml Statify
    - lobby
    - survival

presence:
  mode: single                     # single | rotate | schedule
  type: PLAYING
  format: "%online%/%max% online"
  rotation-interval-sec: 30
  status:
    mode: auto
    manual: ONLINE
    active: ONLINE
    empty: IDLE
  list:
    - type: PLAYING
      text: "%online%/%max% игроков"
    - type: LISTENING
      text: "тех. работы"
      status: DND
    - at: "20:00"
      type: STREAMING
      text: "Вечерний стрим"
      url: "https://twitch.tv/example"

messages.yml

Тексты всех сообщений. Плейсхолдеры: %player%, %displayname%, %server%, %role%, %from%, %to%, %message%, %command%, %count%.

Если ключ отсутствует в файле — подставляется значение из bundled-дефолта.

Версионирование конфигов

config-version и messages-version подставляются при сборке и должны совпадать с версией плагина.

При запуске:

  1. Файл отсутствует → создаётся из дефолта.
  2. Найден *.properties → переименовывается в *.old.legacy.yml.
  3. Версия не совпадает → файл бэкапится как <name>.old.<version>.yml, создаётся свежий.

Структура данных

plugins/
├── discord-velocity-0.2.0.jar
└── discord-velocity/
    ├── config.yml
    ├── messages.yml
    ├── config.old.0.1.0.yml
    └── messages.old.0.1.0.yml

Технологии

JDA, SnakeYAML и MariaDB-драйвер шейдятся в ru.dvolk.discordvelocity.shaded.*.

Комментарий

Протестировано на Velocity 3.5.0 #605, Paper 1.21.11 #132, LuckPerms 5.5.57 и statify-paper 1.0.0.

Лицензия

MIT

Quick facts

Install steps are the general flow for this file type — How to install Minecraft Java mods & modpacks walks through it step by step.

File checked by MCModsHub

These come from our own check of the pack file, not from the source page.

Explore more