▶️ ЗАБЕРИ СВОИ 8 ПОДАРКОВ 🎁 ПРИ СОЗДАНИИ СВОЕГО МАЙНКРАФТ СЕРВЕРА
Плагины/PunishNotify
PunishNotify

PunishNotify

Discord punishment notification plugin with interactive web evidence attachment for Paper 1.21.11 / EssentialsX.

Оцените первым
25
0

PunishNotify

🛠️ Discord Punishment Notification Plugin with Web Evidence Attachment for Paper 1.21.11

English Description | Русское описание


🌐 English

PunishNotify is a powerful, lightweight Minecraft Paper 1.21.11 plugin designed to seamlessly bridge server moderation (via EssentialsX) with your Discord moderation channels.

When a moderator bans, mutes, kicks, warns, or jails a player, PunishNotify intercepts the action and initiates a high-speed Discord notification process. What sets PunishNotify apart is its interactive web-based evidence submission system: moderators receive an in-game prompt with action buttons allowing them to drag-and-drop screenshots or videos directly via a browser interface before the notification is posted to Discord.


✨ Key Features

  • 📢 Comprehensive Punishment Tracking: Automatically detects ban, tempban, unban (pardon), mute, unmute, kick, warn, jail, and unjail events.
  • 🖼️ Web Evidence Uploader:
    • Generates a secure, temporary web upload link sent directly to the moderator in Minecraft chat.
    • Interactive Drag & Drop web interface built with modern UI.
    • Supports multiple image and video formats (up to configurable file size & count limits).
    • Automatically embeds the primary image into the Discord embed while attaching remaining files as message attachments.
    • Files are automatically deleted from server storage once dispatched.
  • ⏳ Smart Timeout & Skip Logic:
    • Moderators can click [Skip] in chat or on the web page to instantly send the webhook without evidence.
    • Configurable timeout (default: 2 minutes) automatically dispatches the webhook without attachments if no files are uploaded in time.
  • 🔄 Fault-Tolerant Retry Queue:
    • Outages or Discord API rate limits will not cause lost reports.
    • Failed dispatches enter an in-memory retry queue with configurable attempt counts and backoff intervals.
  • ⚙️ Granular Event Toggles: Individually enable or disable webhook notifications for specific punishment types in config.yml.

🔄 How It Works

 1. Moderator executes punishment command (/ban, /mute, /warn, etc.)
                          │
                          ▼
 2. PunishNotify intercepts event & generates a unique upload token
                          │
                          ▼
 3. In-Game Prompt sent to Moderator: [Upload Evidence] [Skip]
                          │
          ┌───────────────┴───────────────┐
          ▼                               ▼
 [Moderator Uploads File]         [Skip or Timeout (120s)]
          │                               │
          ▼                               ▼
 Embed created with images       Embed created without attachments
          │                               │
          └───────────────┬───────────────┘
                          ▼
 4. Dispatch to Discord Webhook (with retry queue if API fails)

📜 Commands & Permissions

CommandPermissionDefaultDescription
/punishnotify reloadpunishnotify.reloadopReloads plugin configuration (config.yml).
/punishnotify skip <token>punishnotify.skipopSkips evidence uploading for an active punishment token.
(Admin Super-node)punishnotify.adminopGrants full access to all plugin commands and permissions.

⚙️ Configuration Guide (config.yml)

The configuration file is located at plugins/PunishNotify/config.yml.

PathTypeDefaultDescription
discord.webhook-urlString""The Discord Webhook URL. Webhooks are disabled if empty.
discord.usernameString"PunishNotify"Custom bot display name in Discord.
discord.avatar-urlString""Direct image URL for the Discord webhook avatar.
discord.retry-enabledBooleantrueEnables the automatic retry queue for failed webhook transmissions.
discord.retry-max-attemptsInteger5Maximum delivery attempts before dropping a report.
discord.retry-interval-secondsInteger30Time interval (seconds) between retry attempts.
http-server.enabledBooleantrueEnables the built-in HTTP server for evidence uploading.
http-server.portInteger8734Network port for the HTTP upload server.
http-server.bindString"0.0.0.0"Network interface IP binding (0.0.0.0 listens on all interfaces).
http-server.public-urlString""Public external URL displayed to moderators (e.g. http://server.example.com:8734). If empty, defaults to http://<bind>:<port>.
evidence.max-file-size-mbInteger25Maximum allowed size (in MB) per uploaded file.
evidence.max-filesInteger10Maximum number of files permitted per punishment report.
evidence.timeout-secondsInteger120Waiting period (seconds) before auto-sending report without evidence.
events.banBooleantrueSend webhook notifications for player bans (/ban, /tempban).
events.unbanBooleantrueSend webhook notifications for player unbans (/pardon, /unban).
events.muteBooleantrueSend webhook notifications for player mutes.
events.unmuteBooleantrueSend webhook notifications for player unmutes.
events.kickBooleantrueSend webhook notifications for player kicks.
events.warnBooleantrueSend webhook notifications for player warnings (/warn).
events.jailBooleantrueSend webhook notifications for player jailing.
events.unjailBooleantrueSend webhook notifications for player release from jail.

📦 Compatibility & Requirements

  • Minecraft Server: Paper 1.21.11 (or modern Paper forks).
  • Java Version: Java 21 or higher.
  • Dependencies: EssentialsX 2.20+ (soft-dependency; required for punishment event tracking).

🔨 Building from Source

# Clone the repository
git clone https://github.com/Golub4ik-Official/PunishNotify.git

# Build with Gradle (JDK 25 required)
./gradlew build

Compiled JAR file location: build/libs/PunishNotify-1.2.0.jar


🇷🇺 Русский

PunishNotify — это производительный плагин для серверов Paper 1.21.11, организующий интеграцию системы наказаний игрового сервера (EssentialsX) с каналами модерации в Discord.

Когда модератор выдаёт бан, мут, кик, предупреждение или отправляет игрока в тюрьму, PunishNotify перехватывает событие и запускает процесc публикации в Discord. Главная особенность плагина — интерактивная система прикрепления доказательств через веб-интерфейс: модератору в чате Minecraft выдаётся ссылка с кнопками, открывающая страницу в браузере для быстрой загрузки скриншотов или видео с помощью Drag-and-Drop.


✨ Основные возможности

  • 📢 Полный отслеживаемый спектр наказаний: бан, временный бан, разбан, мут, размут, кик, предупреждение (warn), тюрьма (jail) и освобождение.
  • 🖼️ Веб-загрузчик доказательств:
    • Генерация уникальной безопасной ссылки для загрузки файловых доказательств.
    • Современный веб-интерфейс загрузки с поддержкой перетаскивания файлов (Drag & Drop).
    • Поддержка изображений и видеофайлов с гибким ограничением размера и количества.
    • Автоматическое встраивание первого изображения в embed Discord-сообщения и прикрепление оставшихся файлов к сообщению.
    • Файлы автоматически удаляются с сервера сразу после отправки.
  • ⏳ Таймаут и пропуск:
    • Возможность нажать [Пропустить] в чате или на веб-странице для мгновенной отправки отчёта без файлов.
    • Настраиваемый таймаут (по умолчанию 2 минуты), по истечении которого отчёт уходит в Discord автоматически без доказательств.
  • 🔄 Очередь повторной отправки (Retry Queue):
    • Временные сбои сети или ограничение запросов Discord (rate-limit) не приведут к потере отчётов.
    • Неотправленные отчёты попадают в очередь в памяти с настраиваемым количеством попыток и интервалом повтора.
  • ⚙️ Гибкое отключение событий: Возможность включать/отключать уведомления для каждого типа наказаний в config.yml.

🔄 Принцип работы

 1. Модератор выдаёт наказание (/ban, /mute, /warn и т.д.)
                          │
                          ▼
 2. PunishNotify перехватывает событие и создаёт токен загрузки
                          │
                          ▼
 3. Модератор получает кнопки в чате: [Загрузить] [Пропустить]
                          │
          ┌───────────────┴───────────────┐
          ▼                               ▼
  [Загрузка файлов в UI]           [Пропуск / Таймаут 120с]
          │                               │
          ▼                               ▼
  Embed с медиа-файлами            Embed без вложений
          │                               │
          └───────────────┬───────────────┘
                          ▼
 4. Отправка вебхука в Discord (с повторами при сбоях)

📜 Команды и права

КомандаПраво (Permission)По умолчаниюОписание
/punishnotify reloadpunishnotify.reloadopПерезагружает конфигурацию плагина (config.yml).
/punishnotify skip <token>punishnotify.skipopПропускает загрузку доказательств для наказания с указанным токеном.
(Админ супер-право)punishnotify.adminopПолный доступ ко всем командам и правам плагина.

⚙️ Гайд по настройке конфигурации (config.yml)

Файл конфигурации расположен по пути plugins/PunishNotify/config.yml.

ПараметрТипПо умолчаниюОписание
discord.webhook-urlString""URL вебхука Discord. Если пусто — отправка отключена.
discord.usernameString"PunishNotify"Отображаемое имя бота в Discord.
discord.avatar-urlString""Прямая ссылка на аватарку бота в Discord.
discord.retry-enabledBooleantrueВключить повторные попытки при недоступности Discord API.
discord.retry-max-attemptsInteger5Максимальное количество попыток отправки отчёта.
discord.retry-interval-secondsInteger30Интервал между повторными попытками в секундах.
http-server.enabledBooleantrueВключить встроенный веб-сервер загрузки доказательств.
http-server.portInteger8734Порт веб-сервера.
http-server.bindString"0.0.0.0"Сетевой IP-интерфейс (0.0.0.0 — все доступные интерфейсы).
http-server.public-urlString""Внешний URL для модераторов (например http://server.example.com:8734). Если пусто, используется http://<bind>:<port>.
evidence.max-file-size-mbInteger25Максимальный размер одного файла в мегабайтах.
evidence.max-filesInteger10Максимальное количество файлов на одно наказание.
evidence.timeout-secondsInteger120Таймаут ожидания доказательств (в секундах) перед авто-отправкой.
events.banBooleantrueОтправка уведомлений о банах (/ban, /tempban).
events.unbanBooleantrueОтправка уведомлений о разбанах (/pardon, /unban).
events.muteBooleantrueОтправка уведомлений о мутах.
events.unmuteBooleantrueОтправка уведомлений о размутах.
events.kickBooleantrueОтправка уведомлений о киках.
events.warnBooleantrueОтправка уведомлений о предупреждениях (/warn).
events.jailBooleantrueОтправка уведомлений о тюрьме.
events.unjailBooleantrueОтправка уведомлений об освобождении из тюрьмы.

📦 Совместимость и требования

  • Сервер Minecraft: Paper 1.21.11 (или совместимые форки).
  • Версия Java: Java 21 и новее.
  • Зависимости: EssentialsX 2.20+ (softdepend, необходим для отслеживания событий).

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

# Клонировать репозиторий
git clone https://github.com/Golub4ik-Official/PunishNotify.git

# Собрать через Gradle (требуется JDK 25)
./gradlew build

Собраный JAR-файл: build/libs/PunishNotify-1.2.0.jar

Партнёрский материал

Сервер для плагина PunishNotify - как у профи

Плагин PunishNotify создан для серверов: на своём сервере вы настраиваете его под себя и решаете, кому играть. Создать сервер с плагином PunishNotify для друзей можно за пару минут - BungeeHost всё уже подготовил.

Часто задаваемые вопросы

Совместимость

Minecraft: Java Edition

1.21.x

Платформы

Поддерживаемые окружения

Сервер

Ссылки

Создатели

Детали

Лицензия:
Опубликован:3 месяца назад
Обновлён:3 месяца назад
Главная