ProtectCord — 高级 IP 保护与 Moderation(管理)
通过实时 IP 情报阻止 VPN、代理、机器人和恶意连接。内置 Moderation 功能、AutoMod 聊天过滤、小号检测以及 MySQL 多服务器同步 —— 全部集成在一个轻量级插件中。
ProtectCord 会在玩家加入服务器之前,将其连接信息与实时威胁情报数据库进行比对。结合全套 Moderation 套件,它是保持服务器整洁和社区安全的唯一必备工具。
✨ 里程碑
- 2,300+ Modrinth 下载量
- 100,000+ ProtectCord API 请求已服务
- 46 个独特的 Minecraft 服务器同时运行 ProtectCord
- 203 名受保护的并发玩家
- 1,000+ 个已验证的独特 Discord 用户
- 3,000+ 每日独特 API 请求
- 555 个使用 @ProtectCord#0253 的 Discord Guilds
- 守护着 100,000+ 名 Discord 用户
bStats:
✨ 主要功能
IP 保护
- ?️ 实时 IP 验证 — 每次连接都会针对实时威胁情报进行检查
- ? VPN、代理 & Tor 屏蔽 — 立即阻止封禁规避者和账号代练
- ? 数据中心 IP 检测 — 标记并阻止用于机器人的主机提供商 IP
- ⚠️ 基于风险的屏蔽 — 可配置的威胁等级:UNKNOWN → LOW → MEDIUM → HIGH → CRITICAL
- ? 地理屏蔽 — 使用 ISO 代码屏蔽或白名单整个国家
- ? 每 IP 账号数量限制 — 限制来自单个 IP 的同时连接数
- ✅ 智能白名单系统 — 通过玩家名称、UUID 或 IP 绕过保护
Moderation 套件
- ⚡ 渐进式警告系统 — 可配置从警告 → 踢出 → 封禁的自动升级机制
- ⏱️ 临时封禁 & 临时静音 — 具有人类可读持续时间(
1h, 7d, 30d)的限时惩罚
- ? 静音系统 — 持久性静音,包含原因、执行者追踪和自动过期
- ? 小号账号检测 — 通过共享 IP 查找小号 (
/pc alts <player>) — 仅显示名称,绝不显示原始 IP
- ? 警告历史 — 任何玩家(在线或离线)的完整时间戳警告日志
- ? 清除 & 移除警告 — 按索引移除单个警告或一次性清除所有警告
- ?️ 审计日志 — 自动记录所有 Moderation 操作
- ? 离线玩家支持 — 对未在线的玩家进行警告、封禁、静音或检查
AutoMod(聊天过滤)
- ? 反链接 — 屏蔽 URL,支持域名白名单
- ? 反广告 — 屏蔽服务器 IP 和 Discord 邀请链接
- ? 反垃圾信息 — 速率限制,支持可配置的消息窗口和重复检测
- ? 反脏话 — 自定义单词黑名单,支持正则表达式和单字例外
- ? 反大写 — 可按百分比配置的大写阈值
- ? 反刷屏 — 屏蔽重复字符刷屏
- ? 反 Unicode/Zalgo — 屏蔽不可见文本和字符滥用
- ⚙️ 逐规则操作 — 每条规则独立设置为:
BLOCK(屏蔽)、WARN(警告)、KICK(踢出)、MUTE(静音)或 TEMPMUTE(临时静音)
存储与多服务器
- ?️ YAML 扁平文件存储 — 零设置,开箱即用
- ? MySQL 存储 — 完整的 MySQL 后端,带有 HikariCP 连接池
- ? 多服务器同步 — 在整个网络中共享一个 MySQL 数据库;封禁和静音将在每个服务器上强制执行
- ? 实时迁移 — 随时通过
/pc migrate 在 YAML 和 MySQL 之间迁移
- ? 数据清理 — 使用
/pc purge 清理旧警告、封禁、静音、IP 日志、审计条目和不活跃玩家
Staff 工具
- ? 游戏内 Staff 警报 — 踢出、封禁、警告、静音、AutoMod 操作等的实时通知
- ? IP 掩码 — 向 Staff 显示掩码后的 IP(
192.168.1.*),直到他们获得 protectcord.ip.full 权限
- ? 玩家举报 — 玩家通过
/report 提交举报;Staff 将在游戏内和通过 Discord 收到通知
- ? API 统计 — 使用
/pc stats 检查使用情况、速率限制和 API 健康状况
- ? 手动 IP 检查 —
/pc check <player|ip> 用于按需威胁分析
平台与集成
- ? 6 大平台支持 — Paper, Spigot, Folia, BungeeCord, Velocity 和 Forge
- ? Discord Webhooks — 丰富的嵌入消息,包含国旗、城市、VPN/代理/Tor/风险字段、逐事件控制、速率限制和重试逻辑
- ? Moderation 警报 Webhooks — 用于封禁/警告/静音/踢出等 Staff 事件的单独 webhook 频道
- ⚡ 100% 异步 — 所有 IP 检查均为非阻塞;不影响主线程
? 支持的平台
| Platform |
Versions |
Notes |
| Paper |
1.13 – 1.21+ |
推荐用于独立服务器 |
| Spigot |
1.8.8 – 1.21+ |
完整的旧版本支持 |
| Folia |
1.19+ |
多线程调度器支持 |
| Velocity |
3.0+ |
推荐用于代理网络 |
| BungeeCord |
1.8.8 – 1.21+ |
兼容 Waterfall |
| Forge |
1.20.1+ |
仅限服务端;登录后检查 |
网络提示: 仅在您的代理(Velocity/BungeeCord)上安装即可使用单个 API Key 保护所有后端服务器。
? 快速设置
1️⃣ 获取您的免费 API Key
- 访问 protectcord.com
- 创建免费账户
- 从 Dashboard → API Keys 生成 API Key
- 免费套餐包含每分钟 32 次请求 — 足以满足大多数服务器的需求
2️⃣ 安装插件
- 从 Modrinth 下载适合您平台的正确 JAR 文件
- 将其放入
plugins/ 文件夹(Forge 则为 mods/)
- 启动服务器 — 配置文件自动生成
- 将您的 API Key 添加到
plugins/ProtectCord/config.yml
- 运行
/protectcord reload 或重启服务器
- ✅ 您的服务器现已受到保护
⚙️ 完整配置参考
配置文件在首次运行时自动生成于 plugins/ProtectCord/config.yml。以下解释了每个选项。
Velocity 使用 config.toml(结构相同,TOML 语法)。Forge 使用 config/protectcord-forge.toml。
API 设置
# 您的 ProtectCord API Key — 可在 https://protectcord.com/dashboard/api-keys 免费获取
api-key: "YOUR_API_KEY_HERE"
# 等待 API 响应超时时间(毫秒)
api-timeout:
connect: 15000 # 建立连接的时间(默认:15s)
read: 15000 # 连接后等待响应的时长(默认:15s)
# 对失败/超时的 API 请求自动重试
api-retry:
max-attempts: 3 # 在允许/拒绝玩家之前最大重试次数(1–5)
initial-delay: 1000 # 第一次重试前的等待时长(毫秒)
max-delay: 5000 # 重试之间的最大等待时长(毫秒)
multiplier: 2.0 # 每次重试时延迟的倍增因子(指数退避)
服务器标识
# 用于玩家追踪和多服务器 MySQL 识别
server:
name: "My Server" # 友好名称 — 存储在 MySQL 中,作为每一行的 server_id
ip: "" # 你的公网 IP — 留空以自动检测
port: 25565 # 你的服务器端口
type: "spigot" # 平台类型:paper / spigot / bungeecord / velocity / forge / folia
玩家追踪
# 通过 ProtectCord API 进行基于 UUID 的追踪
player-tracking:
enabled: true
block-flagged-players: true # 阻止被 API 标记为恶意的玩家
block-inactive-players: false # 阻止账户被标记为不活跃的玩家
IP 保护
# 总开关 — 设置为 false 可禁用所有 IP 检查(不建议)
enable-ip-check: true
# 选择要阻止的连接类型
block-vpn: true # 虚拟专用网络(封禁逃避者、小号)
block-proxy: true # HTTP/SOCKS 代理和匿名器
block-tor: true # Tor 出口节点
block-datacenter: true # 数据中心托管 IP(常见机器人来源)
block-bogon: true # 无效、保留或不可路由的 IP 范围
# 基于风险的拦截(可选,作为上述标志的补充运行)
# 启用此选项可通过整体威胁分数进行拦截,而非(或同时)使用单个标志
enable-risk-level-blocking: false
blocked-risk-level: "HIGH"
# 等级说明(每个等级会拦截自身及以上的所有等级):
# LOW — 拦截 LOW, MEDIUM, HIGH, CRITICAL (非常严格)
# MEDIUM — 拦截 MEDIUM, HIGH, CRITICAL
# HIGH — 拦截 HIGH, CRITICAL (如果启用则推荐)
# CRITICAL — 仅拦截 CRITICAL (非常宽松)
地理封锁
geo-blocking:
enabled: false
mode: "blacklist" # "blacklist" = 阻止列出的国家
# "whitelist" = 仅允许列出的国家(其他所有人均被阻止)
countries: # ISO 3166-1 alpha-2 国家代码
- "CN"
- "RU"
每 IP 账号数限制
# 限制同一 IP 地址上可同时连接的 Minecraft 账号数量
account-per-ip-limit:
enabled: false
max-accounts: 3 # 来自同一 IP 的最大同时连接数
enforcement: "BLOCK" # "BLOCK" — 拒绝新连接
# "KICK_OLDEST" — 踢出最旧的会话以腾出空间
Discord Webhook(连接事件)
discord-webhook:
enabled: false
url: "" # 在此粘贴你的 Discord webhook URL
timeout: 10000 # 发送 webhook 的 HTTP 超时时间(毫秒)
# 重试失败的 webhook 投递
retry:
enabled: true
max-attempts: 3 # 对失败投递的重试次数(1–10)
initial-delay: 1000 # 首次重试前的等待时长(毫秒)
max-delay: 10000 # 重试之间的最大等待时长(毫秒)
multiplier: 2.0 # 指数退避倍增因子
# 速率限制 — Discord 允许每个 webhook 每秒约 5 次请求
rate-limit:
max-per-second: 2 # 每秒发送的请求数(1–5)
burst-limit: 5 # 触发节流前的最大突发量
# 哪些事件会发送 webhook 消息
events:
denied: true # 玩家被 ProtectCord 阻止
accepted: false # 玩家通过所有检查并加入(高流量 — 默认关闭)
whitelisted: true # 白名单玩家加入
error: true # 检查过程中发生 API 错误
# embed 中显示哪些数据字段
data-fields:
show-country: true
show-country-flag: true # 国家名称旁边的 ?? 国旗表情符号
show-city: true
show-vpn: true
show-proxy: true
show-datacenter: true
show-tor: true
show-mobile: true
show-satellite: true
show-crawler: true
show-bogon: true
show-risk-level: true
show-abuser: true
show-blacklisted: true
show-company: true # ISP / 托管提供商名称
show-company-risk: true
# 自定义每种 embed 的外观
embeds:
denied:
title: "Connection Denied"
emoji: "x"
color: 15158332 # 十进制 RGB — 红色
footer: "" # 可选页脚文本
thumbnail-url: "" # 右上角可选图片
accepted:
title: "Connection Accepted"
emoji: "white_check_mark"
color: 3066993 # 绿色
footer: ""
thumbnail-url: ""
whitelisted:
title: "Whitelisted Player Joined"
emoji: "white_circle"
color: 16776960 # 黄色
footer: ""
thumbnail-url: ""
error:
title: "API Error"
emoji: "warning"
color: 15105570 # 橙色
footer: ""
thumbnail-url: ""
# 高级 webhook 行为
advanced:
validate-url-on-startup: true # 插件加载时发送测试 ping
log-failures: true # 将失败的投递打印到控制台
log-retries: true # 将重试尝试打印到控制台
queue-size: 100 # 丢弃最旧条目之前的最大排队 webhook 数量
员工警报
# 管理操作的游戏中和 Discord 通知
alerts:
enabled: true
# 向拥有 protectcord.alerts 权限的在线员工广播
in-game:
enabled: true
# 仅用于管理团队事件的独立 webhook 频道
discord-webhook:
enabled: false
url: ""
# 精确调整触发警报的操作
events:
kick: true
ban: true
unban: true
warn: true
clear-warnings: true
remove-warning: true
automod: true
mute: true
unmute: true
tempmute: true
tempban: true
警告系统
warnings:
# 当玩家积累足够多的警告时自动采取行动
auto-action:
enabled: true
action: "BAN" # "BAN" — 永久封禁 | "KICK" — 仅踢出
threshold: 3 # 触发自动行动的警告数量阈值
# 在较低的阈值下,以“最终警告”消息踢出玩家
kick-on-warn:
enabled: true
threshold: 2 # 在此警告数量时踢出玩家(低于封禁阈值)
# 超过此时限的警告不计入阈值统计
expiry:
duration: "0" # "0" = 警告永不过期
# 示例:"7d", "30d", "90d"
# 升级层级 —— 启用时将覆盖自动行动
# 每个层级在警告数量达到 `count` 时触发
escalation:
enabled: false
tiers:
- count: 1
action: "WARN"
- count: 2
action: "TEMPMUTE"
duration: "1h"
- count: 3
action: "TEMPBAN"
duration: "1d"
- count: 4
action: "TEMPBAN"
duration: "7d"
- count: 5
action: "BAN"
# 可用操作:WARN, KICK, MUTE, TEMPMUTE, TEMPBAN, BAN
# 持续时间格式:30s, 10m, 1h, 7d, 30d
自动 Moderation (聊天过滤)
automod:
enabled: false # 主开关 —— 必须为 true 才能运行任何规则
# 阻止操作适用于触发规则的聊天消息。
# 所有规则可用的操作:BLOCK, WARN, KICK, MUTE, TEMPMUTE
# TEMPMUTE 的持续时间由下方的 tempmute-duration 设置。
tempmute-duration: "10m"
# 屏蔽聊天中的链接
anti-link:
enabled: true
action: "BLOCK"
whitelisted-domains: # 允许通过的域名
- "yourdomain.com"
- "discord.gg/yourserver"
# 屏蔽垃圾信息(消息过多过快,或重复内容过多)
anti-spam:
enabled: true
action: "BLOCK"
max-messages: 5 # 时间窗口内允许的最大消息数
time-window-seconds: 10 # 滚动窗口大小(秒)
max-duplicates: 3 # 窗口内允许的最大相同消息数
# 屏蔽服务器 IP 和 Discord 邀请链接
anti-advertising:
enabled: true
action: "BLOCK"
block-server-ips: true # 屏蔽类似 "play.someserver.net" 的模式
block-discord-invites: true # 屏蔽 discord.gg/... 链接
whitelisted-domains:
- "yourdomain.com"
- "discord.gg/yourserver"
# 屏蔽脏话和自定义禁用词汇
anti-swear:
enabled: false
action: "BLOCK"
use-regex: false # 设为 true 可将 blocked-words 条目视为正则表达式模式
blocked-words:
- "badword1"
- "badword2"
whitelisted-words: # 即使匹配模式,这些词也永远不会被屏蔽
- "scrapbook"
# 屏蔽过度使用大写字母
anti-caps:
enabled: false
action: "BLOCK"
min-message-length: 5 # 忽略短消息(例如 "OK", "YES")
threshold-percent: 70.0 # 如果大写比例超过此百分比则屏蔽
# 屏蔽字符泛滥(aaaaaaaaaa, !!!!!!!!!)
anti-flood:
enabled: false
action: "BLOCK"
max-repeated-chars: 5 # 连续相同字符的数量阈值,达到后屏蔽
min-message-length: 3 # 忽略极短的消息
# 屏蔽 Unicode 滥用和 Zalgo 文本
anti-unicode:
enabled: false
action: "BLOCK"
block-zalgo: true # 屏蔽组合变音符号堆叠(z͎̤̙̘̭͇͠a̵͔͓l̡͔͍̦͚͙g̢͕̲͔͔͕ö̥́)
max-unicode-percent: 50.0 # 如果非 ASCII 字符比例超过此百分比则屏蔽
玩家举报
reports:
enabled: true
cooldown-seconds: 60 # 玩家两次举报之间必须等待的时间(秒)
# 将举报发布到 Discord 频道
discord-webhook:
enabled: false
url: ""
mention-role-id: "" # 可选 —— 收到举报时 @ping 某个角色(例如 "123456789")
notify-staff: true # 向在线工作人员广播举报,附带 protectcord.alerts 权限
predefined-reasons: [] # 可选列表,显示在 tab-complete 补全中
# 示例:["Hacking", "Spam", "Harassment", "Inappropriate name"]
数据库存储
database:
type: "YAML" # "YAML" — 扁平文件存储(默认,无需配置)
# "MYSQL" — MySQL/MariaDB(用于多服务器同步所需)
mysql:
host: "localhost"
port: 3306
database: "protectcord" # 数据库名称(启动前必须存在)
username: "root"
password: ""
table-prefix: "pc_" # 所有表以此作为前缀(例如 pc_warnings, pc_bans)
# HikariCP 连接池设置
pool:
max-pool-size: 10 # 最大同时数据库连接数
min-idle: 2 # 保持打开的最小空闲连接数
connection-timeout: 30000 # 从池中获取连接的最大等待时间(毫秒)
idle-timeout: 600000 # 超过此时长后关闭空闲连接(毫秒)
max-lifetime: 1800000 # 超过此时长后回收连接(毫秒)
IP 掩码
# 控制 IP 地址在命令输出中对工作人员的显示方式
# 拥有 protectcord.ip.full 权限的工作人员始终可以看到完整 IP
ip-masking:
enabled: false
mask-format: "last-octet"
# "last-octet" → 192.168.1.* (隐藏最后一段)
# "last-two-octets" → 192.168.*.* (隐藏最后两段)
# "full-mask" → *.*.*.* (隐藏所有内容)
自定义消息
# 所有消息均支持 & 颜色代码。各消息列出的占位符如下。
messages:
# 向被 IP 检查拦截的玩家显示 — {reason}, {risk}
connection-denied: |
&c&l连接被拒绝
&7您的连接已被 ProtectCord 拦截。
&7原因:&c{reason}
&7风险等级:&c{risk}
&7如果您认为这是误判,请联系服务器工作人员。
# 当检查期间 API 不可用时显示
api-error: |
&c&l临时连接问题
&7我们目前无法验证您的连接。
&7请稍后重试。
# 向因单 IP 账户数限制被阻止的玩家显示 — {max}, {current}
account-limit-reached: |
&c&l达到连接限制
&7每个 IP 最大账户数:&c{max}
&7来自您 IP 的当前连接数:&c{current}
&7请在连接前断开另一个账户。
# 向因执行 KICK_OLDEST 策略被踢出的最旧会话显示 — {max}
account-limit-kicked: |
&c&l您已断开连接
&7有新账户从您的 IP 地址连接。
&7每个 IP 最大账户数:&c{max}
# 当玩家追踪阻止了有标记的玩家时显示 — {flags}
player-flagged: |
&c&l连接被拒绝
&7您的账户已被标记。
&7标记:&c{flags}
&7如果您认为这是误判,请联系服务器工作人员。
# 当玩家追踪阻止了不活跃玩家时显示
player-inactive: |
&c&l连接被拒绝
&7您的账户已被停用。
&7请联系服务器工作人员。
# 向绕过 IP 检查的白名单玩家在聊天中显示
whitelist-bypass: "&a您已绕过 IP 验证。"
---
## ? 命令与权限
**别名:** `/pc`, `/protect`
### 核心命令
| 命令 | 描述 |
|---------|-------------|
| `/pc reload` | 重载配置文件、白名单和存储数据 |
| `/pc stats` | 查看 API 使用情况和速率限制 |
| `/pc check <player\|ip>` | 按需进行 IP 威胁分析 |
| `/pc version` | 插件版本和平台信息 |
| `/pc health` | API 连通性健康检查 |
| `/pc alerts` | 切换游戏内工作人员警报的开/关状态 |
### 白名单命令
| 命令 | 描述 |
|---------|-------------|
| `/pc whitelist add player <name>` | 按名称将玩家加入白名单 |
| `/pc whitelist add uuid <uuid>` | 按 UUID 加入白名单 |
| `/pc whitelist add ip <address>` | 按 IP 地址加入白名单 |
| `/pc whitelist remove <type> <value>` | 移除白名单条目 |
| `/pc list` | 列出所有白名单条目 |
### 管理命令
| 命令 | 描述 |
|---------|-------------|
| `/pc kick <player> [reason]` | 踢出在线玩家并附带 IP 信息 |
| `/pc warn <player> <reason>` | 发出警告(自动升级处理) |
| `/pc warnings <player>` | 查看完整的警告历史 |
| `/pc clear warning <player>` | 清除所有警告 |
| `/pc clear ban <player>` | 清除封禁记录 |
| `/pc remove warning <player> [#]` | 通过索引移除特定警告 |
| `/pc ban <player> <reason>` | 永久封禁玩家 |
| `/pc tempban <player> <duration> <reason>` | 临时封禁(`1h`, `7d`, `30d`) |
| `/pc unban <player>` | 解封玩家 |
| `/pc mute <player> <reason>` | 永久禁言玩家 |
| `/pc tempmute <player> <duration> <reason>` | 临时禁言 |
| `/pc unmute <player>` | 解除禁言 |
| `/pc alts <player>` | 查找共享 IP 的副号账号 |
### 存储命令
| 命令 | 描述 |
|---------|-------------|
| `/pc migrate <yaml\|mysql>` | 在不同存储后端之间迁移所有数据 |
| `/pc purge <type> <days>` | 删除超过 X 天的数据 |
**清理类型:** `warnings`, `bans`, `mutes`, `iplogs`, `auditlog`, `inactive`, `all`
### 玩家命令
| 命令 | 描述 |
|---------|-------------|
| `/report [player] <reason>` | 举报玩家(或提交匿名举报) |
### 权限
| 权限 | 描述 | 默认值 |
|------------|-------------|---------|
| `protectcord.admin` | 所有 `/pc` 命令 | OP |
| `protectcord.bypass` | 加入时绕过 IP 检查 | false |
| `protectcord.alerts` | 接收游戏内工作人员警报 | OP |
| `protectcord.ip.full` | 在命令输出中查看未掩码的 IP | OP |
| `protectcord.automod.bypass.*` | 绕过所有 AutoMod 检查 | false |
---
## ⚡ 渐进式警告系统
根据警告数量自动升级处罚措施。提供两种模式:
### 简单模式(默认)
| 警告次数 | 行动 |
|---------|--------|
| 第 1 次 | 游戏内警告消息 |
| 第 2 次 | 被踢出,附带“最终警告”消息 |
| 第 3 次 | 永久封禁 |
### 升级阶梯模式(可配置)
完全自定义的升级流程 — 任何 WARN → TEMPMUTE → TEMPBAN → BAN 的组合均可:
1 次警告 → 警告消息
2 次警告 → 临时禁言(1 小时)
3 次警告 → 临时封禁(1 天)
4 次警告 → 临时封禁(7 天)
5 次警告 → 永久封禁
警告可以选择在配置的时间段后**过期**(`7d`, `30d` 等),这样过去的行为不会永远跟随玩家。
---
## ? AutoMod — 自动化聊天过滤
毫不费力地保护您的聊天环境。每个 AutoMod 规则独立运行,并可配置为对违规玩家执行 `BLOCK`(屏蔽)、`WARN`(警告)、`KICK`(踢出)、`MUTE`(禁言)或 `TEMPMUTE`(临时禁言)。
| 规则 | 检测内容 |
|------|----------------|
| **Anti-Link** | URL 链接,支持按域名设置白名单 |
| **Anti-Advertising** | 其他服务器 IP、Discord 邀请链接 |
| **Anti-Spam** | 消息频率和重复刷屏 |
| **Anti-Swear** | 自定义词库,支持正则表达式和例外情况 |
| **Anti-Caps** | 大写比例过高 |
| **Anti-Flood** | 重复字符滥用 |
| **Anti-Unicode** | Zalgo 文本和不可见字符滥用 |
---
## ? 副号账号检测
通过一条命令找出逃避封禁或使用多个账号的玩家:
/pc alts Notch
→ [ProtectCord] Notch 的副号账号:
- Notch2 (共享 IP 数: 2)
- AltAccount99 (共享 IP 数: 1)
IP 地址在副号输出中**永远不会显示** — 工作人员仅看到玩家名称,在识别逃避者同时保护隐私。
---
## ?️ MySQL 与多服务器同步
将所有数据(警告、封禁、禁言、IP 历史记录、审计日志)存储在 MySQL 数据库中,而不是本地 YAML 文件。
- **所有服务器共享一个数据库** —— 在 Factions 模式下禁用,在 Survival 模式下被阻止
- **HikariCP 连接池** —— 高性能且线程安全
- **自动建表** —— 首次启动时自动创建数据表
- **server_id 追踪** —— 每一行记录都包含操作来源的服务器 ID
- **实时迁移** —— 使用 `/pc migrate mysql` 命令从 YAML 配置迁移到 MySQL(或反向迁移)
/pc migrate mysql
→ 已迁移 47 名玩家、12 条 IP 封禁、203 条审计日志。
→ 更新 config.yml 中的 database.type 并运行 /pc reload。
---
## ? 数据清理
使用精细化的清理命令保持数据库整洁:
/pc purge warnings 90 — 移除超过 90 天的警告
/pc purge bans 30 — 移除超过 30 天已过期的封禁
/pc purge mutes 30 — 移除超过 30 天已过期的静音
/pc purge iplogs 365 — 移除超过 1 年的 IP 历史记录
/pc purge auditlog 90 — 修剪审计日志
/pc purge inactive 180 — 移除超过 6 个月未出现的玩家记录
/pc purge all 90 — 执行以上所有清理操作
---
## ? Discord 集成
### 连接 Webhook
每当有玩家被封禁、接受或加入白名单时,获取丰富的 Discord 嵌入消息:
- 国家(带国旗 emoji)、城市、VPN/代理/Tor/数据中心/Bogon 标识、风险等级、所属公司
- 按事件类型切换通知 —— 仅接收你关心的事件
- 速率限制 —— 符合 Discord 的限制要求
- 自动重试 —— 采用指数退避策略
### 管理员警报 Webhook
用于管理事件的独立 Webhook:封禁、解封、警告、踢出、静音、AutoMod 操作 —— 让你的管理团队随时掌握动态。
### 30 秒完成设置
1. Discord → 服务器设置 → 集成 → Webhooks → 新建 Webhook → 复制 URL
2. 添加到 `config.yml`:
```yaml
discord-webhook:
enabled: true
url: "https://discord.com/api/webhooks/YOUR_WEBHOOK"
/pc reload
?️ IP 检测原理
每位连接玩家的 IP 都会发送至 ProtectCord API 进行评估:
| 检查项 |
检测内容 |
| VPN |
用于隐藏位置的虚拟专用网络 |
| Proxy |
HTTP/SOCKS 代理及匿名器 |
| Tor |
Tor 出口节点 |
| Datacenter |
托管服务提供商(常见机器人来源) |
| Bogon |
无效或保留的 IP 段 |
| Risk Score |
AI 生成的风险评分,范围从 UNKNOWN 到 CRITICAL |
| Geo |
来源国家(用于地理封锁) |
自动绕过规则
以下情况不会调用 API:
- 本地回环地址 (
127.0.0.1, ::1)
- 私有网络 (
192.168.x.x, 10.x.x.x, 172.16–31.x.x)
- 白名单中的玩家、UUID 或 IP
❓ 常见问题
这是免费的吗?
是的。免费 API 密钥包含 每分钟 32 次请求,足以满足大多数服务器的需求。
它会拖慢我的服务器性能吗?
不会。所有 IP 检查都是 完全异步 的,绝不会阻塞主线程。
合法玩家会被误封吗?
极少发生。可使用 /pc check <player> 查看原因,然后通过 /pc whitelist add player <name> 将其加入白名单。你也可以将 blocked-risk-level 设置为 CRITICAL 以降低封禁强度。
它支持离线模式吗?
支持。该插件可在在线模式和离线模式下正常运行。
关于代理网络怎么办?
仅在代理端(BungeeCord 或 Velocity)安装 ProtectCord。所有后端服务器只需一个插件和一个 API 密钥即可自动受到保护。
如果 API 宕机了怎么办?
默认情况下,在 API 中断期间允许玩家连接。这可以防止大规模锁服,并且可以在配置文件中更改此行为。
你们会存储玩家数据吗?
仅有 IP 地址会发送至 ProtectCord API。用户名或 UUID 不会对外传输。请参阅我们的 隐私政策。
我可以跨服务器同步封禁吗?
可以 —— 启用 MySQL 存储并将所有服务器指向同一个数据库。封禁和静音将在整个网络范围内自动强制执行。
? 故障排除
“API KEY NOT CONFIGURED!”(未配置 API 密钥!)
前往 protectcord.com/dashboard 获取你的密钥,将其添加到 config.yml,然后运行 /pc reload。
玩家被错误封禁
运行 /pc check <player> 查看原因。使用 /pc whitelist add player <name> 将其加入白名单,或降低 blocked-risk-level 的值。
达到速率限制
免费套餐:32 次请求/分钟(约每 2 秒 1 名玩家)。解决方案:将常玩玩家加入白名单以跳过 API 调用,或者仅在代理端而非所有后端服务器上安装插件。
Discord Webhook 无反应
验证 URL 是否正确、enabled: true 是否已设置、相关事件是否已启用,并检查控制台是否有错误信息。
MySQL 连接失败
检查配置文件中的主机/端口/凭据。确保 MySQL 用户拥有 CREATE TABLE 权限。请查看控制台中 HikariCP 的错误提示。
? 链接与支持
? 支持本项目
- ⭐ 在 Modrinth 上关注
- ? 加入 Discord 社区
- ? 留下评论并分享你的体验
- ? 在 Discord 上报告错误或提出功能建议
为 Minecraft 社区用心制作 —— ProtectCord,因为预防胜于治理。
ProtectCord — Advanced IP Protection & Moderation
Block VPNs, proxies, bots, and malicious connections with real-time IP intelligence. Built-in moderation, AutoMod chat filtering, alt detection, and MySQL multi-server sync — all in one lightweight plugin.
ProtectCord connects every joining player against a live threat intelligence database before they ever reach your server. Combined with a full moderation suite, it's the only tool you need to keep your server clean and your community safe.
✨ Milestones
- 2,300+ downloads on Modrinth
- 100,000+ ProtectCord API requests served
- 46 unique Minecraft servers running ProtectCord concurrently
- 203 concurrent protected players
- 1,000+ unique Discord users verified
- 3,000+ unique API requests per day
- 555 Discord Guilds using @ProtectCord#0253
- Watching over 100,000+ Discord users
bStats:
✨ Key Features
IP Protection
- ?️ Real-Time IP Verification — Every connection checked against live threat intelligence
- ? VPN, Proxy & Tor Blocking — Stop ban evaders and alt accounts instantly
- ? Datacenter IP Detection — Flag and block hosting provider IPs used for bots
- ⚠️ Risk-Based Blocking — Configurable threat levels: UNKNOWN → LOW → MEDIUM → HIGH → CRITICAL
- ? Geo-Blocking — Block or whitelist entire countries using ISO codes
- ? Accounts-Per-IP Limiting — Cap simultaneous connections from a single IP
- ✅ Smart Whitelist System — Bypass protection by player name, UUID, or IP
Moderation Suite
- ⚡ Progressive Warning System — Configurable auto-escalation from warn → kick → ban
- ⏱️ Temp Bans & Temp Mutes — Time-limited punishments with human-readable durations (
1h, 7d, 30d)
- ? Mute System — Persistent mutes with reasons, issuer tracking, and auto-expiry
- ? Alt Account Detection — Find alts by shared IP (
/pc alts <player>) — names only, never raw IPs
- ? Warning History — Full timestamped warning logs for any player, online or offline
- ? Clear & Remove Warnings — Remove individual warnings by index or clear all at once
- ?️ Audit Log — Automatic log of all moderation actions
- ? Offline Player Support — Warn, ban, mute, or check players who aren't online
AutoMod (Chat Filtering)
- ? Anti-Link — Block URLs with domain whitelist support
- ? Anti-Advertising — Block server IPs and Discord invites
- ? Anti-Spam — Rate limiting with configurable message window and duplicate detection
- ? Anti-Swear — Custom word blacklist with regex support and per-word exceptions
- ? Anti-Caps — Configurable caps threshold by percentage
- ? Anti-Flood — Block repeated character flooding
- ? Anti-Unicode/Zalgo — Block invisible text and character abuse
- ⚙️ Per-Rule Actions — Each rule independently set to:
BLOCK, WARN, KICK, MUTE, or TEMPMUTE
Storage & Multi-Server
- ?️ YAML Flatfile Storage — Zero setup, works out of the box
- ? MySQL Storage — Full MySQL backend with HikariCP connection pooling
- ? Multi-Server Sync — Share one MySQL database across your entire network; bans and mutes are enforced on every server
- ? Live Migration — Migrate between YAML and MySQL at any time with
/pc migrate
- ? Data Purge — Clean up old warnings, bans, mutes, IP logs, audit entries, and inactive players with
/pc purge
Staff Tools
- ? In-Game Staff Alerts — Real-time notifications for kicks, bans, warns, mutes, automod actions, and more
- ? IP Masking — Show staff masked IPs (
192.168.1.*) until they earn the protectcord.ip.full permission
- ? Player Reports — Players submit reports with
/report; staff are notified in-game and via Discord
- ? API Stats — Check usage, rate limits, and API health with
/pc stats
- ? Manual IP Check —
/pc check <player|ip> for on-demand threat analysis
Platform & Integration
- ? 6-Platform Support — Paper, Spigot, Folia, BungeeCord, Velocity, and Forge
- ? Discord Webhooks — Rich embeds with country flag, city, VPN/proxy/tor/risk fields, per-event control, rate limiting, and retry logic
- ? Moderation Alert Webhooks — Separate webhook channel for ban/warn/mute/kick staff events
- ⚡ 100% Async — All IP checks are non-blocking; no main-thread impact
? Supported Platforms
| Platform |
Versions |
Notes |
| Paper |
1.13 – 1.21+ |
Recommended for standalone servers |
| Spigot |
1.8.8 – 1.21+ |
Full legacy support |
| Folia |
1.19+ |
Multithreaded scheduler support |
| Velocity |
3.0+ |
Recommended for proxy networks |
| BungeeCord |
1.8.8 – 1.21+ |
Waterfall compatible |
| Forge |
1.20.1+ |
Server-side only; checks at post-login |
Network tip: Install only on your proxy (Velocity/BungeeCord) to protect all backend servers with a single API key.
? Quick Setup
1️⃣ Get Your Free API Key
- Visit protectcord.com
- Create a free account
- Generate an API key from Dashboard → API Keys
- Free tier includes 32 requests/minute — enough for most servers
2️⃣ Install the Plugin
- Download the correct JAR for your platform from Modrinth
- Drop it into your
plugins/ folder (or mods/ for Forge)
- Start your server — config generates automatically
- Add your API key to
plugins/ProtectCord/config.yml
- Run
/protectcord reload or restart
- ✅ Your server is now protected
⚙️ Full Configuration Reference
The config file is auto-generated at plugins/ProtectCord/config.yml on first run. Every option is explained below.
Velocity uses config.toml (same structure, TOML syntax). Forge uses config/protectcord-forge.toml.
API Settings
# Your ProtectCord API key — get one free at https://protectcord.com/dashboard/api-keys
api-key: "YOUR_API_KEY_HERE"
# How long to wait (ms) for the API to respond before giving up
api-timeout:
connect: 15000 # Time to establish the connection (default: 15s)
read: 15000 # Time to wait for a response after connecting (default: 15s)
# Automatic retry for failed/timed-out API requests
api-retry:
max-attempts: 3 # Max number of retries before allowing/denying the player (1–5)
initial-delay: 1000 # Wait this long before the first retry (ms)
max-delay: 5000 # Never wait longer than this between retries (ms)
multiplier: 2.0 # Multiply delay by this factor each retry (exponential backoff)
Server Identity
# Used for player tracking and multi-server MySQL identification
server:
name: "My Server" # Friendly name — stored in MySQL as server_id on every row
ip: "" # Your public IP — leave blank to auto-detect
port: 25565 # Your server port
type: "spigot" # Platform: paper / spigot / bungeecord / velocity / forge / folia
Player Tracking
# UUID-based tracking via the ProtectCord API
player-tracking:
enabled: true
block-flagged-players: true # Block players flagged as malicious by the API
block-inactive-players: false # Block players whose accounts are marked inactive
IP Protection
# Master switch — set to false to disable all IP checking (not recommended)
enable-ip-check: true
# Choose which connection types to block
block-vpn: true # Virtual private networks (ban evaders, alt accounts)
block-proxy: true # HTTP/SOCKS proxies and anonymizers
block-tor: true # Tor exit nodes
block-datacenter: true # Hosting provider IPs (common source of bots)
block-bogon: true # Invalid, reserved, or unroutable IP ranges
# Risk-based blocking (optional, runs in addition to the flags above)
# Enable this to block by overall threat score instead of (or as well as) individual flags
enable-risk-level-blocking: false
blocked-risk-level: "HIGH"
# Levels (each blocks itself and everything above it):
# LOW — blocks LOW, MEDIUM, HIGH, CRITICAL (very strict)
# MEDIUM — blocks MEDIUM, HIGH, CRITICAL
# HIGH — blocks HIGH, CRITICAL (recommended if enabling)
# CRITICAL — blocks CRITICAL only (very lenient)
Geographic Blocking
geo-blocking:
enabled: false
mode: "blacklist" # "blacklist" = block listed countries
# "whitelist" = ONLY allow listed countries (everyone else blocked)
countries: # ISO 3166-1 alpha-2 country codes
- "CN"
- "RU"
Accounts Per IP
# Limit how many Minecraft accounts can connect simultaneously from the same IP
account-per-ip-limit:
enabled: false
max-accounts: 3 # Maximum simultaneous connections from one IP
enforcement: "BLOCK" # "BLOCK" — deny the new connection
# "KICK_OLDEST" — kick the oldest session to make room
Discord Webhook (Connection Events)
discord-webhook:
enabled: false
url: "" # Paste your Discord webhook URL here
timeout: 10000 # HTTP timeout for sending the webhook (ms)
# Retry failed webhook deliveries
retry:
enabled: true
max-attempts: 3 # How many times to retry a failed delivery (1–10)
initial-delay: 1000 # Wait before first retry (ms)
max-delay: 10000 # Maximum wait between retries (ms)
multiplier: 2.0 # Exponential backoff multiplier
# Rate limiting — Discord allows ~5 requests per 2 seconds per webhook
rate-limit:
max-per-second: 2 # Requests sent per second (1–5)
burst-limit: 5 # Maximum burst before throttling kicks in
# Which events send a webhook message
events:
denied: true # Player was blocked by ProtectCord
accepted: false # Player passed all checks and joined (high volume — off by default)
whitelisted: true # A whitelisted player joined
error: true # An API error occurred during a check
# Which data fields appear in the embed
data-fields:
show-country: true
show-country-flag: true # ?? flag emoji next to country name
show-city: true
show-vpn: true
show-proxy: true
show-datacenter: true
show-tor: true
show-mobile: true
show-satellite: true
show-crawler: true
show-bogon: true
show-risk-level: true
show-abuser: true
show-blacklisted: true
show-company: true # ISP / hosting provider name
show-company-risk: true
# Customise the appearance of each embed type
embeds:
denied:
title: "Connection Denied"
emoji: "x"
color: 15158332 # Decimal RGB — red
footer: "" # Optional footer text
thumbnail-url: "" # Optional image in top-right corner
accepted:
title: "Connection Accepted"
emoji: "white_check_mark"
color: 3066993 # Green
footer: ""
thumbnail-url: ""
whitelisted:
title: "Whitelisted Player Joined"
emoji: "white_circle"
color: 16776960 # Yellow
footer: ""
thumbnail-url: ""
error:
title: "API Error"
emoji: "warning"
color: 15105570 # Orange
footer: ""
thumbnail-url: ""
# Advanced webhook behaviour
advanced:
validate-url-on-startup: true # Send a test ping when the plugin loads
log-failures: true # Print failed deliveries to console
log-retries: true # Print retry attempts to console
queue-size: 100 # Max webhooks queued before dropping oldest
Staff Alerts
# In-game and Discord notifications for moderation actions
alerts:
enabled: true
# Broadcast to online staff with the protectcord.alerts permission
in-game:
enabled: true
# Separate webhook channel just for mod-team events
discord-webhook:
enabled: false
url: ""
# Fine-tune exactly which actions trigger an alert
events:
kick: true
ban: true
unban: true
warn: true
clear-warnings: true
remove-warning: true
automod: true
mute: true
unmute: true
tempmute: true
tempban: true
Warning System
warnings:
# Automatically take action when a player accumulates enough warnings
auto-action:
enabled: true
action: "BAN" # "BAN" — permanent ban | "KICK" — kick only
threshold: 3 # Number of warnings before auto-action fires
# Kick the player with a "final warning" message at a lower threshold
kick-on-warn:
enabled: true
threshold: 2 # Kick at this warning count (before the ban threshold)
# Warnings older than this are not counted toward thresholds
expiry:
duration: "0" # "0" = warnings never expire
# Examples: "7d", "30d", "90d"
# Escalation tiers — overrides auto-action when enabled
# Each tier fires when warning count reaches `count`
escalation:
enabled: false
tiers:
- count: 1
action: "WARN"
- count: 2
action: "TEMPMUTE"
duration: "1h"
- count: 3
action: "TEMPBAN"
duration: "1d"
- count: 4
action: "TEMPBAN"
duration: "7d"
- count: 5
action: "BAN"
# Available actions: WARN, KICK, MUTE, TEMPMUTE, TEMPBAN, BAN
# Duration format: 30s, 10m, 1h, 7d, 30d
AutoMod (Chat Filtering)
automod:
enabled: false # Master switch — must be true for any rules to run
# Blocked actions apply to the message that triggered the rule.
# Available actions for all rules: BLOCK, WARN, KICK, MUTE, TEMPMUTE
# TEMPMUTE duration is set by tempmute-duration below.
tempmute-duration: "10m"
# Block links in chat
anti-link:
enabled: true
action: "BLOCK"
whitelisted-domains: # These domains are allowed through
- "yourdomain.com"
- "discord.gg/yourserver"
# Block spam (too many messages too fast, or too many duplicates)
anti-spam:
enabled: true
action: "BLOCK"
max-messages: 5 # Max messages allowed within the time window
time-window-seconds: 10 # Rolling window size in seconds
max-duplicates: 3 # Max identical messages allowed in the window
# Block server IPs and Discord invite links
anti-advertising:
enabled: true
action: "BLOCK"
block-server-ips: true # Blocks patterns like "play.someserver.net"
block-discord-invites: true # Blocks discord.gg/... links
whitelisted-domains:
- "yourdomain.com"
- "discord.gg/yourserver"
# Block profanity and custom banned words
anti-swear:
enabled: false
action: "BLOCK"
use-regex: false # Set true to treat blocked-words entries as regex patterns
blocked-words:
- "badword1"
- "badword2"
whitelisted-words: # These words are never blocked even if they match a pattern
- "scrapbook"
# Block excessive CAPS LOCK
anti-caps:
enabled: false
action: "BLOCK"
min-message-length: 5 # Ignore short messages (e.g. "OK", "YES")
threshold-percent: 70.0 # Block if more than this % of letters are uppercase
# Block character flooding (aaaaaaaaaa, !!!!!!!!!)
anti-flood:
enabled: false
action: "BLOCK"
max-repeated-chars: 5 # Consecutive identical characters before blocking
min-message-length: 3 # Ignore very short messages
# Block Unicode abuse and Zalgo text
anti-unicode:
enabled: false
action: "BLOCK"
block-zalgo: true # Block combining diacritical mark stacking (z͎̤̙̘̭͇͠a̵͔͓l̡͔͍̦͚͙g̢͕̲͔͔͕ö̥́)
max-unicode-percent: 50.0 # Block if more than this % of chars are non-ASCII
Player Reports
reports:
enabled: true
cooldown-seconds: 60 # How long a player must wait between reports
# Post reports to a Discord channel
discord-webhook:
enabled: false
url: ""
mention-role-id: "" # Optional — ping a role when a report comes in (e.g. "123456789")
notify-staff: true # Broadcast reports to online staff with protectcord.alerts
predefined-reasons: [] # Optional list of reasons shown in tab-complete
# Example: ["Hacking", "Spam", "Harassment", "Inappropriate name"]
Database Storage
database:
type: "YAML" # "YAML" — flatfile storage (default, no setup needed)
# "MYSQL" — MySQL/MariaDB (required for multi-server sync)
mysql:
host: "localhost"
port: 3306
database: "protectcord" # Database name (must exist before starting)
username: "root"
password: ""
table-prefix: "pc_" # All tables prefixed with this (e.g. pc_warnings, pc_bans)
# HikariCP connection pool settings
pool:
max-pool-size: 10 # Maximum simultaneous database connections
min-idle: 2 # Minimum idle connections kept open
connection-timeout: 30000 # Max wait for a connection from the pool (ms)
idle-timeout: 600000 # Close idle connections after this long (ms)
max-lifetime: 1800000 # Recycle connections after this long (ms)
IP Masking
# Control how IP addresses appear to staff in command output
# Staff with the protectcord.ip.full permission always see the full IP
ip-masking:
enabled: false
mask-format: "last-octet"
# "last-octet" → 192.168.1.* (hides last segment)
# "last-two-octets" → 192.168.*.* (hides last two segments)
# "full-mask" → *.*.*.* (hides everything)
Custom Messages
# All messages support & colour codes. Placeholders listed per message.
messages:
# Shown to players blocked by IP check — {reason}, {risk}
connection-denied: |
&c&lConnection Denied
&7Your connection has been blocked by ProtectCord.
&7Reason: &c{reason}
&7Risk Level: &c{risk}
&7If you believe this is an error, please contact server staff.
# Shown when the API is unreachable during a check
api-error: |
&c&lTemporary Connection Issue
&7We're unable to verify your connection at the moment.
&7Please try again later.
# Shown to a player blocked by the accounts-per-IP limit — {max}, {current}
account-limit-reached: |
&c&lConnection Limit Reached
&7Maximum accounts per IP: &c{max}
&7Current connections from your IP: &c{current}
&7Please disconnect another account before connecting.
# Shown to the oldest session kicked by KICK_OLDEST enforcement — {max}
account-limit-kicked: |
&c&lYou have been disconnected
&7A new account connected from your IP address.
&7Maximum accounts per IP: &c{max}
# Shown when player-tracking blocks a flagged player — {flags}
player-flagged: |
&c&lConnection Denied
&7Your account has been flagged.
&7Flags: &c{flags}
&7If you believe this is an error, please contact server staff.
# Shown when player-tracking blocks an inactive player
player-inactive: |
&c&lConnection Denied
&7Your account has been deactivated.
&7Please contact server staff.
# Shown in chat to whitelisted players who bypass the IP check
whitelist-bypass: "&aYou have bypassed IP verification."
? Commands & Permissions
Aliases: /pc, /protect
Core Commands
| Command |
Description |
/pc reload |
Reload config, whitelist, and storage |
/pc stats |
View API usage and rate limits |
/pc check <player|ip> |
On-demand IP threat analysis |
/pc version |
Plugin version and platform info |
/pc health |
API connectivity health check |
/pc alerts |
Toggle in-game staff alerts on/off |
Whitelist Commands
| Command |
Description |
/pc whitelist add player <name> |
Whitelist a player by name |
/pc whitelist add uuid <uuid> |
Whitelist by UUID |
/pc whitelist add ip <address> |
Whitelist an IP address |
/pc whitelist remove <type> <value> |
Remove whitelist entry |
/pc list |
List all whitelisted entries |
Moderation Commands
| Command |
Description |
/pc kick <player> [reason] |
Kick an online player with IP info |
/pc warn <player> <reason> |
Issue a warning (auto-escalates) |
/pc warnings <player> |
View full warning history |
/pc clear warning <player> |
Clear all warnings |
/pc clear ban <player> |
Clear a ban record |
/pc remove warning <player> [#] |
Remove a specific warning by index |
/pc ban <player> <reason> |
Permanently ban a player |
/pc tempban <player> <duration> <reason> |
Temp-ban (1h, 7d, 30d) |
/pc unban <player> |
Unban a player |
/pc mute <player> <reason> |
Permanently mute a player |
/pc tempmute <player> <duration> <reason> |
Temp-mute |
/pc unmute <player> |
Unmute a player |
/pc alts <player> |
Find alt accounts by shared IP |
Storage Commands
| Command |
Description |
/pc migrate <yaml|mysql> |
Migrate all data between storage backends |
/pc purge <type> <days> |
Delete data older than X days |
Purge types: warnings, bans, mutes, iplogs, auditlog, inactive, all
Player Commands
| Command |
Description |
/report [player] <reason> |
Report a player (or submit an anonymous report) |
Permissions
| Permission |
Description |
Default |
protectcord.admin |
All /pc commands |
OP |
protectcord.bypass |
Bypass IP checks on join |
false |
protectcord.alerts |
Receive in-game staff alerts |
OP |
protectcord.ip.full |
See unmasked IPs in command output |
OP |
protectcord.automod.bypass.* |
Bypass all AutoMod checks |
false |
⚡ Progressive Warning System
Automatically escalate discipline based on warning count. Two modes available:
Simple Mode (default)
| Warning |
Action |
| 1st |
In-game warning message |
| 2nd |
Kicked with "final warning" message |
| 3rd |
Permanent ban |
Escalation Tiers Mode (configurable)
Fully custom escalation — any combination of WARN → TEMPMUTE → TEMPBAN → BAN:
1 warning → Warning message
2 warnings → Temp mute (1 hour)
3 warnings → Temp ban (1 day)
4 warnings → Temp ban (7 days)
5 warnings → Permanent ban
Warnings can optionally expire after a configured duration (7d, 30d, etc.) so past behavior doesn't follow players forever.
? AutoMod — Automated Chat Filtering
Protect your chat without lifting a finger. Each AutoMod rule runs independently and can be configured to BLOCK, WARN, KICK, MUTE, or TEMPMUTE the offending player.
| Rule |
What It Catches |
| Anti-Link |
URLs, with per-domain whitelist |
| Anti-Advertising |
Other server IPs, Discord invites |
| Anti-Spam |
Message rate and duplicate flooding |
| Anti-Swear |
Custom word list, with regex and exceptions |
| Anti-Caps |
Excessive uppercase by percentage |
| Anti-Flood |
Repeated character abuse |
| Anti-Unicode |
Zalgo text and invisible character abuse |
? Alt Account Detection
Find players evading bans or using multiple accounts with a single command:
/pc alts Notch
→ [ProtectCord] Alt accounts for Notch:
- Notch2 (shared IPs: 2)
- AltAccount99 (shared IPs: 1)
IPs are never displayed in alt output — staff see player names only, protecting privacy while identifying evaders.
?️ MySQL & Multi-Server Sync
Store all data (warnings, bans, mutes, IP history, audit logs) in MySQL instead of local YAML files.
- All servers share one database — ban on Factions, blocked on Survival
- HikariCP connection pooling — high-performance and thread-safe
- Auto table creation — tables are created on first startup
- server_id tracking — every row records which server the action came from
- Live migration — move from YAML to MySQL (or back) with
/pc migrate mysql
/pc migrate mysql
→ Migrated 47 players, 12 IP bans, 203 audit entries.
→ Update database.type in config.yml and run /pc reload.
? Data Purge
Keep your database clean with fine-grained purge commands:
/pc purge warnings 90 — remove warnings older than 90 days
/pc purge bans 30 — remove expired bans older than 30 days
/pc purge mutes 30 — remove expired mutes older than 30 days
/pc purge iplogs 365 — remove IP history older than 1 year
/pc purge auditlog 90 — trim the audit log
/pc purge inactive 180 — remove player records unseen for 6 months
/pc purge all 90 — run all of the above
? Discord Integration
Connection Webhook
Get a rich Discord embed every time a player is blocked, accepted, or whitelisted:
- Country with flag emoji, city, VPN/proxy/tor/datacenter/bogon flags, risk level, company
- Per-event toggle — only receive the events you care about
- Rate limiting to stay within Discord's limits
- Automatic retry with exponential backoff
Staff Alert Webhook
Separate webhook for moderation events: bans, unbans, warns, kicks, mutes, AutoMod actions — so your mod team always knows what's happening.
Setup in 30 seconds
- Discord → Server Settings → Integrations → Webhooks → New Webhook → Copy URL
- Add to
config.yml:
discord-webhook:
enabled: true
url: "https://discord.com/api/webhooks/YOUR_WEBHOOK"
/pc reload
?️ How IP Detection Works
Every connecting player's IP is sent to the ProtectCord API for evaluation:
| Check |
What It Detects |
| VPN |
Virtual private networks used to hide location |
| Proxy |
HTTP/SOCKS proxies and anonymizers |
| Tor |
Tor exit nodes |
| Datacenter |
Hosting providers (common bot source) |
| Bogon |
Invalid or reserved IP ranges |
| Risk Score |
AI-powered score from UNKNOWN to CRITICAL |
| Geo |
Country of origin (for geo-blocking) |
Automatic Bypasses
No API call is made for:
- Localhost (
127.0.0.1, ::1)
- Private networks (
192.168.x.x, 10.x.x.x, 172.16–31.x.x)
- Whitelisted players, UUIDs, or IPs
❓ FAQ
Is this free?
Yes. The free API key includes 32 requests per minute, enough for most servers.
Will it lag my server?
No. All IP checks are fully asynchronous and never block the main thread.
Can legitimate players get blocked?
Rarely. Use /pc check <player> to see why, then /pc whitelist add player <name>. You can also raise blocked-risk-level to CRITICAL for less aggressive blocking.
Does it work with offline mode?
Yes. The plugin functions in both online and offline mode.
What about proxy networks?
Install only on the proxy (BungeeCord or Velocity). All backend servers are automatically protected with one plugin and one API key.
What if the API is down?
Players are allowed to connect by default during API outages. This prevents lockouts and can be changed in config.
Do you store player data?
Only IP addresses are sent to the ProtectCord API. No usernames or UUIDs are transmitted externally. See our privacy policy.
Can I sync bans across servers?
Yes — enable MySQL storage and point all servers at the same database. Bans and mutes are enforced network-wide automatically.
? Troubleshooting
"API KEY NOT CONFIGURED!"
Get your key at protectcord.com/dashboard, add it to config.yml, run /pc reload.
Player blocked incorrectly
Run /pc check <player> to see the reason. Whitelist with /pc whitelist add player <name> or lower blocked-risk-level.
Rate limit hit
Free tier: 32 req/min (~1 player every 2 seconds). Solutions: whitelist regulars to skip API calls, or install only on your proxy instead of all backends.
Discord webhook silent
Verify URL is correct, enabled: true, events are enabled, and check console for errors.
MySQL connection failed
Check host/port/credentials in config. Ensure the MySQL user has CREATE TABLE privileges. Check console for the HikariCP error message.
? Links & Support
? Support the Project
- ⭐ Follow on Modrinth
- ? Join the Discord community
- ? Leave a review and share your experience
- ? Report bugs or suggest features on Discord
Made with ❤️ for the Minecraft community — ProtectCord, because prevention is better than moderation.
评论 0
登录后参与评分
还没有评论,来抢沙发吧