🔨 AdventureBan

一、简介

AdventureBan —— 一款现代化跨服封禁管理系统,灵感来自 LiteBans

AdventureBan 为您提供全面的玩家惩罚管理方案。支持封禁、禁言、警告、踢出、IP封禁等多类型惩罚,拥有模板阶梯系统、关联账号检测、跨服实时同步、Discord Webhook通知等功能。适用于所有规模的服务器群组。

AdventureBan 同时支持 Spigot / Paper / Purpur 服务端和 Velocity 代理端,并且会第一时间支持未来版本。

AdventureBan

  • 多类型惩罚 > 封禁、禁言、警告、踢出、IP封禁、IP禁言
  • 跨服同步 > 数据库同步表实现多服实时生效
  • 模板系统 > 自定义惩罚阶梯,累犯自动升级处罚
  • 关联账号检测 > IP 关联检测,自动通知管理员小号信息
  • 数据库支持 > H2 (内嵌) 和 MySQL / MariaDB
  • Discord通知 > Webhook 惩罚信息实时推送
  • 灵活时长 > 支持 30s/10m/2h/7d/2w/1mo/1y/permanent 等格式
  • 命令标记 > -s(静默) -g(全局) -I(IP模式) -d(删除) server:指定服务器
  • Velocity支持 > 代理端独立运行,全群组统一管理
  • 高自定义 > 消息文本、封禁界面全部可配置

二、插件前置说明

都是非必须

  • 无前置依赖 — 本插件为纯独立插件,无需任何前置

📥 安装

Spigot / Paper / Purpur 端

  1. AdventureBan-Spigot-1.0.0.jar 放入 plugins/
  2. 启动服务器,自动生成默认配置
  3. 编辑 plugins/AdventureBan/config.yml
  4. 使用 /adventureban reload 重载配置

Velocity 代理端

  1. AdventureBan-Velocity-1.0.0.jar 放入 Velocity plugins/
  2. 启动代理,自动生成 config.jsonmessages.json
  3. 确保数据库设置与 Spigot 端一致
  4. 重启代理服务器

跨服配置要点

⚠️ 重要
  • 所有服务器必须连接同一数据库(推荐 MySQL)
  • 每个服务器需设置唯一 server-name
  • 同步通过 adventureban_sync 表自动完成

命令

惩罚命令

命令用法
/ban/ban <玩家> [时长] [标记] [原因]
/tempban/tempban <玩家> <时长> [标记] [原因]
/mute/mute <玩家> [时长] [标记] [原因]
/tempmute/tempmute <玩家> <时长> [标记] [原因]
/warn/warn <玩家> [标记] [原因]
/kick/kick <玩家> [标记] [原因]
/ipban/ipban <玩家|IP> [时长] [原因]
/ipmute/ipmute <玩家|IP> [时长] [原因]

撤销命令

命令用法
/unban/unban <玩家> [原因]
/unmute/unmute <玩家> [原因]
/unwarn/unwarn <玩家> [原因]

查询命令

命令用法
/checkban/checkban <玩家>
/checkmute/checkmute <玩家>
/warnings/warnings [玩家]
/history/history <玩家> [页码]
/staffhistory/staffhistory <执行者> [页码]
/banlist/banlist [页码]
/mutelist/mutelist [页码]
/dupeip/dupeip <玩家|IP>

管理命令

命令用法
/staffrollback/staffrollback <执行者> [时长]
/lockdown/lockdown [end] [server:名称]
/adventureban reload重载配置
/adventureban info查看数据库信息

使用示例

# 永久封禁
/ban Steve 使用外挂

# 临时封禁 7 天 (静默)
/tempban Steve 7d -s 使用 X-Ray

# 全局禁言 1 小时
/mute Steve 1h -g 刷屏

# 使用模板 (自动阶梯升级)
/ban Steve cheating

# 指定服务器范围
/ban Steve 30d server:survival 滥用Bug

# IP 封禁
/ipban Steve 30d 使用外挂

# 关联账号查询
/dupeip Steve

🔑 权限

命令权限

权限描述默认
adventureban.admin管理员权限OP
adventureban.ban封禁OP
adventureban.mute禁言OP
adventureban.warn警告OP
adventureban.kick踢人OP
adventureban.ipbanIP 封禁OP
adventureban.ipmuteIP 禁言OP
adventureban.unban解封OP
adventureban.unmute解禁言OP
adventureban.unwarn撤销警告OP
adventureban.check检查惩罚状态OP
adventureban.history查看历史OP
adventureban.staffhistory员工记录OP
adventureban.warnings查看警告全部
adventureban.dupeip关联账号OP
adventureban.staffrollback员工回滚OP
adventureban.lockdown锁服OP

通知权限

权限描述默认
adventureban.notify.broadcast接收惩罚广播全部
adventureban.notify.silent查看静默惩罚OP
adventureban.notify.alts关联账号通知OP

豁免 / 绕过

权限描述
adventureban.exempt.ban免疫封禁
adventureban.exempt.mute免疫禁言
adventureban.exempt.warn免疫警告
adventureban.exempt.kick免疫踢出
adventureban.bypass.mute绕过禁言
adventureban.lockdown.bypass锁服绕过

⚙️ 配置文件

config.yml

# 服务器名称 (跨服同步标识)
server-name: "lobby"

# 数据库配置
database:
  type: h2          # h2 或 mysql
  mysql:
    host: localhost
    port: 3306
    database: adventureban
    username: root
    password: ""

# 跨服同步轮询间隔 (ticks)
sync:
  interval-ticks: 40

# 关联账号检测
alt-detection:
  notify: true
  auto-ban: false

# 禁言时屏蔽的命令
mute:
  blocked-commands:
    - msg
    - tell
    - whisper
    - r
    - reply

# 锁服设置
lockdown:
  bypass-op: true

messages.yml (部分)

prefix: "&6[AdventureBan] "

# 封禁踢出界面
ban-screen: "&c&l你已被封禁\n\n&7原因: &f$reason\n..."

# 广播消息
broadcast-ban: "&c$player &7被 &e$executor &7封禁了..."

# 变量: $player, $executor, $reason, $duration, $remaining, $date, $id

📋 惩罚模板

模板系统允许创建自动升级的惩罚阶梯。使用 /ban 玩家 模板ID 触发,系统自动根据历史违规次数选择对应等级。

模板示例 - templates.yml

templates:
  cheating:
    type: ban
    tiers:
      - duration: 7d
        reason: "作弊行为 (第一次)"
      - duration: 30d
        reason: "作弊行为 (第二次)"
      - duration: permanent
        reason: "作弊行为 (永久封禁)"

  toxic:
    type: mute
    group: chat-offense
    tiers:
      - duration: 1h
        reason: "辱骂 (第一次)"
      - duration: 1d
        reason: "辱骂 (第二次)"
      - duration: permanent
        reason: "辱骂 (永久禁言)"

  rule-break:
    type: warn
    tiers:
      - reason: "违反规则 (警告)"
      - reason: "再次违规"
        commands:
          - "tempban $player 1d 多次违规"

groups:
  chat-offense:
    - toxic
    - spam

工作原理

  1. 执行 /ban Steve cheating
  2. 系统查找名为 cheating 的模板
  3. 计算该玩家在模板(及同组)中的历史违规次数
  4. 根据违规次数选择对应 Tier
  5. 自动使用 Tier 定义的时长和原因执行惩罚

🏷️ PlaceholderAPI 变量

变量描述
%adventureban_is_banned%是否被封禁 (true/false)
%adventureban_is_muted%是否被禁言 (true/false)
%adventureban_ban_reason%封禁原因
%adventureban_ban_remaining%封禁剩余时间
%adventureban_ban_executor%封禁执行者
%adventureban_mute_reason%禁言原因
%adventureban_mute_remaining%禁言剩余时间
%adventureban_warning_count%活跃警告数量

📡 Discord Webhook

webhooks.yml 中配置 Discord Webhook,自动推送惩罚信息。

配置

discord:
  enabled: true
  url: "https://discord.com/api/webhooks/YOUR_ID/YOUR_TOKEN"
  username: "AdventureBan"

颜色方案

  • 封禁 / IP 封禁 — 🔴 红色
  • 禁言 / IP 禁言 — 🟠 橙色
  • 警告 — 🟡 黄色
  • 踢出 — 🔵 蓝色

📝 更新日志

v1.0.0 — 初始版本

  • NEW 完整惩罚系统:封禁、禁言、警告、踢出、IP 封禁、IP 禁言
  • NEW 跨服同步(数据库同步表)
  • NEW 模板/阶梯惩罚系统
  • NEW 关联账号 (Alt) 检测和通知
  • NEW H2 + MySQL/MariaDB 数据库
  • NEW PlaceholderAPI 集成
  • NEW Discord Webhook 通知
  • NEW Velocity 代理端完整支持
  • NEW 员工回滚 + 服务器锁定
  • NEW 完整权限系统
  • NEW 命令标记:静默、全局、IP、删除、服务器范围