Better IP Use (BIU)
报告问题及发布:
Reporting issues and publishing:
一款轻量级、抗冲突的 Minecraft 插件,通过内置 Uapipro API 集成实现玩家地域显示与聊天内容过滤。包含智能地域格式化、敏感词检测、发言冷却及社区举报系统。
? Special thanks to Uapipro for providing reliable public APIs used in this plugin.
? 特别鸣谢 Uapipro 提供稳定可靠的公共 API 支持。
提示:
版本下载对应说明:
1.X 支持 1.19-1.20.6 | 2.X 支持 1.20.6-1.21.11 | 3.X 支持 1.13-1.18.2(开发中)
✨ 核心功能
? 智能地域显示
通过 https://uapis.cn/api/v1/network/ipinfo?ip=%IP% 获取地区数据,并在三个界面统一格式:
- Tab 列表:作为后缀追加 →
Steve [中国 北京]
- 聊天消息:重写格式 →
Steve[中国 北京]: Hello!
- 姓名标签(头顶上方):使用前缀以增强可见性 →
[中国 北京] Steve
默认情况下,地域信息会自动截取前两个空格分隔的部分(例如 "中国 北京 海淀区" → "中国 北京")。可通过 display.region_format: auto | full 进行配置。
? 敏感词过滤
使用 https://uapis.cn/api/v1/sensitive-word/quick-check 检测违规内容。若满足以下条件之一,则标记为违规:
- 响应中包含
"status": "forbidden",或
forbidden_words 数组中有 ≥1 项。
惩罚流程:
- 首次违规 → 警告
- 再次违规 → 禁言(默认:5 分钟)
- 可选:禁言时广播通知
绕过权限:better_ip_use.bypass。
⏳ 聊天冷却系统
通过设置消息之间的可配置延迟(默认:5 秒)来防止刷屏。违规玩家会看到倒计时。
? 社区举报 (/biu report <player>)
玩家可以举报他人最近的不当言论:
- 检查最近 5 分钟内 的 3 条消息
- 举报人冷却时间:5 分钟(可配置)
- 若任何消息违规,目标将被自动禁言
- 完全异步执行 —— 不会造成服务器卡顿
♻️ 资源效率与清理
- 每个玩家的 IP 到地区结果会被缓存
- 所有玩家数据(缓存、历史记录、禁言状态)在退出时清理
- 可通过
/biu clearcache 手动清除缓存
- 聊天记录在 10 分钟后自动过期以节省内存
⚙️ 冲突感知事件处理
- 显示更新使用
EventPriority.MONITOR — 在 Essentials/CMI 等插件之后运行
- 聊天格式化使用
EventPriority.HIGH — 可靠地覆盖大多数聊天系统
⚠️ 要求
- Minecraft: Spigot/Paper 1.19 至 1.20.4(含两端)
- Java: 17+
- 网络访问: 必须能够访问
uapis.cn
❗ 本插件目前仅支持 Java 17 及 Minecraft 1.19–1.20.4。
❗ This plugin currently only supports Java 17 and Minecraft 1.19–1.20.4.
? 我们正在对 Bukkit 进行适配,可以自行进行尝试。
? We are currently adapting BIU for Bukkit. You may try it at your own risk.
? 配置亮点 (config.yml)
# 语言设置: zh / en
language: "zh"
# 功能开关
settings:
# 启用聊天合规检查
enable_chat_check: true
# 启用预审核模式 (true = 发送后审核再显示, false = 实时审核拦截)
# true: 玩家发送 -> 服务器审核 -> 通过则广播显示, 不通过则屏蔽
# false: 玩家发送 -> 实时检测 -> 违规则拦截并取消事件
pre_moderation: true
# 启用 IP 显示 (Tab/头顶/聊天)
enable_ip_display: true
# 聊天冷却设置
chat_cooldown:
enabled: true
# 冷却时间 (秒)
seconds: 5
# 举报系统设置
report_system:
enabled: true
# 检查几分钟内的消息
check_minutes_ago: 5
# 举报冷却时间 (秒)
reporter_cooldown_seconds: 300
# 每次最多检查几条消息
max_check_messages: 3
# API 配置
api:
sensitive_word:
# 正确的API端点 - 使用uapis.cn的敏感词检测接口
url: "https://uapis.cn/api/v1/text/profanitycheck"
ip_info:
# IP信息查询接口模板
url_template: "https://uapis.cn/api/v1/network/ipinfo?ip=%IP%"
# 显示设置
display:
region_format: "auto" # auto (取前两级) 或 full (完整)
color: "&3"
unknown_text: "Unknown"
# Tab 列表后缀
tab_suffix_enabled: true
# 聊天后缀
chat_suffix_enabled: true
# 头顶前缀
nametag_prefix_enabled: true
# 处罚设置
punishment:
warn_first: true
mute_minutes: 5
broadcast_on_mute: true
消息多语言配置
messages:
zh:
prefix: "&3[&bBIU&3] &r"
warn: "&c您的发言包含不合规内容,请注意文明用语。"
cooldown: "&c请勿频繁发言,还需等待 &e%time% &c秒。"
mute: "&c你因多次违规已被禁言 %mute_minutes% 分钟。"
mute_admin: "&c你已被管理员禁言。"
mute_active: "&c你当前处于禁言状态,无法发言。"
mute_broadcast: "&c玩家 &e%player% &c因多次违规已被禁言 %mute_minutes% 分钟。"
unmuted: "&a你已被解除禁言,可以正常发言了。"
unmuted_auto: "&a你的禁言时间已到,已自动解除禁言。"
reload: "&a配置已重载。"
cache_cleared: "&aIP地址缓存已清除,所有玩家显示已重置。"
no_permission: "&c你没有权限执行此操作。"
help: |
&a/biu help &7- 显示帮助
&a/biu reload &7- 重载配置
&a/biu clearcache &7- 清除IP缓存
&a/biu report <玩家> &7- 举报玩家近期违规发言
&a/biu mute <玩家> &7- 手动禁言玩家
&a/biu unmute <玩家> &7- 解除玩家禁言
&a/biu check <文本> &7- 检测文本是否违规
report_usage: "&c用法: /biu report <玩家名>"
report_disabled: "&c举报系统当前已禁用。"
report_cooldown: "&c举报功能冷却中,还需等待 &e%time% &c秒。"
report_self: "&c不能举报自己。"
report_target_no_history: "&c该玩家近期无可举报的发言记录。"
report_checking: "&a正在检查玩家 &e%player% &a的近期发言..."
report_success_compliant: "&a举报检查结果:玩家 &e%player% &a近期发言合规。"
report_success_forbidden: "&c举报检查结果:玩家 &e%player% &c存在违规发言,已自动禁言。"
report_broadcast: "&c玩家 &e%player% &c因被举报违规发言,已被系统禁言。举报者: &e%reporter%"
mute_cmd_usage: "&c用法: /biu mute <玩家名>"
unmute_cmd_usage: "&c用法: /biu unmute <玩家名>"
player_muted: "&c已手动禁言玩家 &e%player%&c。"
player_unmuted: "&a已解禁玩家 &e%player%&a。"
player_not_found: "&c未找到玩家: &e%player%&c。"
en:
prefix: "&3[&bBIU&3] &r"
warn: "&c你的消息包含不合规内容。请保持文明。"
cooldown: "&c请勿刷屏。请等待 &e%time% &c秒。"
mute: "&c由于多次违规,你已被禁言 %mute_minutes% 分钟。"
mute_admin: "&c你已被管理员禁言。"
mute_active: "&c你当前处于禁言状态,无法聊天。"
mute_broadcast: "&c玩家 &e%player% &c已被禁言 %mute_minutes% 分钟。"
unmuted: "&a你已解除禁言。现在可以正常聊天了。"
unmuted_auto: "&a你的禁言时间已过期。现在可以正常聊天了。"
reload: "&a配置已重新加载。"
cache_cleared: "&aIP 地址缓存已清除。"
no_permission: "&c你没有权限。"
help: |
&a/biu help &7- 显示帮助信息
&a/biu reload &7- 重新加载配置
&a/biu clearcache &7- 清除 IP 缓存
&a/biu report <player> &7- 举报玩家近期的不良聊天行为
&a/biu mute <player> &7- 手动禁言某玩家
&a/biu unmute <player> &7- 解除某玩家的禁言
&a/biu check <text> &7- 检查文本是否违反规则
report_usage: "&c用法:/biu report <player>"
report_disabled: "&c举报系统当前已禁用。"
report_cooldown: "&c举报功能处于冷却中。请等待 &e%time% &c秒。"
report_self: "&c你不能举报自己。"
report_target_no_history: "&c目标玩家没有可举报的近期聊天历史。"
report_checking: "&a正在检查 &e%player%&a 的近期消息..."
report_success_compliant: "&a举报结果:玩家 &e%player% &a符合规范。"
report_success_forbidden: "&c举报结果:玩家 &e%player% &c违反规则。已自动禁言。"
report_broadcast: "&c玩家 &e%player% &c因举报被禁言。举报者:&e%reporter%"
mute_cmd_usage: "&c用法:/biu mute <player>"
unmute_cmd_usage: "&c用法:/biu unmute <player>"
player_muted: "&c玩家 &e%player%&c 已被手动禁言。"
player_unmuted: "&a玩家 &e%player%&c 已解除禁言。"
player_not_found: "&c未找到玩家:&e%player%&c。"
所有显示元素共享相同的颜色和备用文本。
? 命令与权限
| 命令 |
权限 |
描述 |
/biu help |
better_ip_use.use |
显示帮助信息 |
/biu reload |
better_ip_use.reload |
重新加载配置 |
/biu clearcache |
better_ip_use.reload |
清除 IP 缓存 |
/biu report <player> |
better_ip_use.use |
举报玩家近期的聊天行为 |
/biu mute <player> |
better_ip_use.admin |
手动禁言玩家 |
/biu unmute <player> |
better_ip_use.admin |
解除玩家禁言 |
默认权限仅限 OP(操作员)。支持 Tab 补全。
? 部署
- 将
BetterIPUse.jar 放入 plugins/ 目录
- 启动服务器以生成
config.yml
- 根据需要调整设置(默认值即可与 Uapipro 配合使用)
- 修改后使用
/biu reload 重载配置
无需额外依赖——使用 Spigot 内置的 Gson。
无遥测、无广告、无隐藏功能。
No telemetry, no ads, no hidden features.
符合 Modrinth 社区规范。
Complies with Modrinth Community Guidelines.
Better IP Use (BIU)
报告问题及发布:
Reporting issues and publishing:
A lightweight, conflict-resistant Minecraft plugin that displays player geolocation and filters inappropriate chat using built-in integrations with Uapipro APIs. Features include smart location formatting, sensitive word detection, chat cooldowns, and a community-driven reporting system.
一款轻量级、抗冲突的 Minecraft 插件,通过内置 Uapipro API 集成实现玩家地域显示与聊天内容过滤。包含智能地域格式化、敏感词检测、发言冷却及社区举报系统。
? Special thanks to Uapipro for providing reliable public APIs used in this plugin.
? 特别鸣谢 Uapipro 提供稳定可靠的公共 API 支持。
Tips:
Version download corresponds to:
1.X supports 1.19-1.20.6 | 2.X supports 1.20.6-1.21.11 | 3. X supports 1.13-1.18.2 (in development)
✨ Core Features
? Smart Geolocation Display
Fetches region data via https://uapis.cn/api/v1/network/ipinfo?ip=%IP% and formats it consistently across three interfaces:
- Tab List: Appends as suffix →
Steve [中国 北京]
- Chat Message: Rewrites format →
Steve[中国 北京]: Hello!
- Nametag (Above Head): Uses prefix for visibility →
[中国 北京] Steve
By default, regions are auto-trimmed to the first two space-separated parts (e.g., "中国 北京 海淀区" → "中国 北京"). Configurable via display.region_format: auto | full.
? Sensitive Word Filtering
Uses https://uapis.cn/api/v1/sensitive-word/quick-check to detect violations. A message is flagged if:
- Response contains
"status": "forbidden", or
- The
forbidden_words array has ≥1 entry.
Punishment flow:
- First offense → warning
- Repeat offense → mute (default: 5 minutes)
- Optional broadcast on mute
Bypass permission: better_ip_use.bypass.
⏳ Chat Cooldown System
Prevents spam by enforcing a configurable delay between messages (default: 5 seconds). Players see a countdown when violating.
? Community Reporting (/biu report <player>)
Players can report others for recent inappropriate speech:
- Checks up to 3 messages from the last 5 minutes
- Reporter cooldown: 5 minutes (configurable)
- If any message violates rules, target is automatically muted
- Fully asynchronous — no server lag
♻️ Resource Efficiency & Cleanup
- IP-to-region results are cached per player
- All player data (cache, history, mutes) is cleaned on quit
- Manual cache clearing via
/biu clearcache
- Chat history automatically expires after 10 minutes to save memory
⚙️ Conflict-Aware Event Handling
- Display updates use
EventPriority.MONITOR — runs after plugins like Essentials/CMI
- Chat formatting uses
EventPriority.HIGH — reliably overrides most chat systems
⚠️ Requirements
- Minecraft: Spigot/Paper 1.19 to 1.20.4 (inclusive)
- Java: 17+
- Internet Access: Must reach
uapis.cn
❗ This plugin currently only supports Java 17 and Minecraft 1.19–1.20.4.
❗ 本插件目前仅支持 Java 17 及 Minecraft 1.19–1.20.4。
? We are currently adapting BIU for Bukkit. You may try it at your own risk.
? 我们正在对 Bukkit 进行适配,可以自行进行尝试。
? Configuration Highlights (config.yml)
# 语言设置: zh / en
language: "zh"
# 功能开关
settings:
# 启用聊天合规检查
enable_chat_check: true
# 启用预审核模式 (true = 发送后审核再显示, false = 实时审核拦截)
# true: 玩家发送 -> 服务器审核 -> 通过则广播显示, 不通过则屏蔽
# false: 玩家发送 -> 实时检测 -> 违规则拦截并取消事件
pre_moderation: true
# 启用 IP 显示 (Tab/头顶/聊天)
enable_ip_display: true
# 聊天冷却设置
chat_cooldown:
enabled: true
# 冷却时间 (秒)
seconds: 5
# 举报系统设置
report_system:
enabled: true
# 检查几分钟内的消息
check_minutes_ago: 5
# 举报冷却时间 (秒)
reporter_cooldown_seconds: 300
# 每次最多检查几条消息
max_check_messages: 3
# API 配置
api:
sensitive_word:
# 正确的API端点 - 使用uapis.cn的敏感词检测接口
url: "https://uapis.cn/api/v1/text/profanitycheck"
ip_info:
# IP信息查询接口模板
url_template: "https://uapis.cn/api/v1/network/ipinfo?ip=%IP%"
# 显示设置
display:
region_format: "auto" # auto (取前两级) 或 full (完整)
color: "&3"
unknown_text: "Unknown"
# Tab 列表后缀
tab_suffix_enabled: true
# 聊天后缀
chat_suffix_enabled: true
# 头顶前缀
nametag_prefix_enabled: true
# 处罚设置
punishment:
warn_first: true
mute_minutes: 5
broadcast_on_mute: true
# 消息多语言配置
messages:
zh:
prefix: "&3[&bBIU&3] &r"
warn: "&c您的发言包含不合规内容,请注意文明用语。"
cooldown: "&c请勿频繁发言,还需等待 &e%time% &c秒。"
mute: "&c你因多次违规已被禁言 %mute_minutes% 分钟。"
mute_admin: "&c你已被管理员禁言。"
mute_active: "&c你当前处于禁言状态,无法发言。"
mute_broadcast: "&c玩家 &e%player% &c因多次违规已被禁言 %mute_minutes% 分钟。"
unmuted: "&a你已被解除禁言,可以正常发言了。"
unmuted_auto: "&a你的禁言时间已到,已自动解除禁言。"
reload: "&a配置已重载。"
cache_cleared: "&aIP地址缓存已清除,所有玩家显示已重置。"
no_permission: "&c你没有权限执行此操作。"
help: |
&a/biu help &7- 显示帮助
&a/biu reload &7- 重载配置
&a/biu clearcache &7- 清除IP缓存
&a/biu report <玩家> &7- 举报玩家近期违规发言
&a/biu mute <玩家> &7- 手动禁言玩家
&a/biu unmute <玩家> &7- 解除玩家禁言
&a/biu check <文本> &7- 检测文本是否违规
report_usage: "&c用法: /biu report <玩家名>"
report_disabled: "&c举报系统当前已禁用。"
report_cooldown: "&c举报功能冷却中,还需等待 &e%time% &c秒。"
report_self: "&c不能举报自己。"
report_target_no_history: "&c该玩家近期无可举报的发言记录。"
report_checking: "&a正在检查玩家 &e%player% &a的近期发言..."
report_success_compliant: "&a举报检查结果:玩家 &e%player% &a近期发言合规。"
report_success_forbidden: "&c举报检查结果:玩家 &e%player% &c存在违规发言,已自动禁言。"
report_broadcast: "&c玩家 &e%player% &c因被举报违规发言,已被系统禁言。举报者: &e%reporter%"
mute_cmd_usage: "&c用法: /biu mute <玩家名>"
unmute_cmd_usage: "&c用法: /biu unmute <玩家名>"
player_muted: "&c已手动禁言玩家 &e%player%&c。"
player_unmuted: "&a已解禁玩家 &e%player%&a。"
player_not_found: "&c未找到玩家: &e%player%&c。"
en:
prefix: "&3[&bBIU&3] &r"
warn: "&cYour message contains non-compliant content. Please be civil."
cooldown: "&cPlease do not spam. Wait &e%time% &cseconds."
mute: "&cYou have been muted for %mute_minutes% minutes due to repeated violations."
mute_admin: "&cYou have been muted by an administrator."
mute_active: "&cYou are currently muted and cannot chat."
mute_broadcast: "&cPlayer &e%player% &chas been muted for %mute_minutes% minutes."
unmuted: "&aYou have been unmuted. You can chat normally now."
unmuted_auto: "&aYour mute time has expired. You can chat normally now."
reload: "&aConfiguration reloaded."
cache_cleared: "&aIP address cache cleared."
no_permission: "&cYou do not have permission."
help: |
&a/biu help &7- Show help
&a/biu reload &7- Reload config
&a/biu clearcache &7- Clear IP cache
&a/biu report <player> &7- Report a player for recent bad chat
&a/biu mute <player> &7- Manually mute a player
&a/biu unmute <player> &7- Unmute a player
&a/biu check <text> &7- Check if text violates rules
report_usage: "&cUsage: /biu report <player>"
report_disabled: "&cReport system is currently disabled."
report_cooldown: "&cReport function is on cooldown. Wait &e%time% &cseconds."
report_self: "&cYou cannot report yourself."
report_target_no_history: "&cTarget player has no recent chat history to report."
report_checking: "&aChecking recent messages from &e%player%&a..."
report_success_compliant: "&aReport Result: Player &e%player% &ais compliant."
report_success_forbidden: "&cReport Result: Player &e%player% &cviolated rules. Auto-muted."
report_broadcast: "&cPlayer &e%player% &cwas muted due to report. Reporter: &e%reporter%"
mute_cmd_usage: "&cUsage: /biu mute <player>"
unmute_cmd_usage: "&cUsage: /biu unmute <player>"
player_muted: "&cPlayer &e%player%&c has been manually muted."
player_unmuted: "&aPlayer &e%player%&c has been unmuted."
player_not_found: "&cPlayer not found: &e%player%&c."
All display elements share the same color and fallback text.
? Commands & Permissions
| Command |
Permission |
Description |
/biu help |
better_ip_use.use |
Show help |
/biu reload |
better_ip_use.reload |
Reload config |
/biu clearcache |
better_ip_use.reload |
Clear IP cache |
/biu report <player> |
better_ip_use.use |
Report player’s recent chat |
/biu mute <player> |
better_ip_use.admin |
Manually mute player |
/biu unmute <player> |
better_ip_use.admin |
Unmute player |
Default permissions: ops only. Tab completion supported.
? Deployment
- Place
BetterIPUse.jar in plugins/
- Start server to generate
config.yml
- Adjust settings if needed (defaults work out-of-box with Uapipro)
- Use
/biu reload after changes
No extra dependencies — uses Spigot’s built-in Gson.
No telemetry, no ads, no hidden features.
无遥测、无广告、无隐藏功能。
Complies with Modrinth Community Guidelines.
遵守 Modrinth 社区规范。
评论 0
登录后参与评分
还没有评论,来抢沙发吧