## 📌 xBlocker 描述

## 示例 #1

xBlocker 是终极插件,用于控制和定制您的 Minecraft 服务器的连接体验,专为希望获得专业性、灵活性和完全兼容性的管理员设计。
🔹 版本管理:
设置允许的最低协议(例如,从 1.16.5 及更高版本),并使用清晰的自定义消息阻止过时或不兼容的客户端。
🔹 自定义消息:
服务器列表(Ping)文本,以通知玩家不受支持的版本。
独特的断开连接屏幕,具有动态占位符,例如 %server_version%。
与 i18n(多语言)的完全集成:消息会自动适应玩家的区域设置。
🔹 国际化 (i18n):
多语言系统,支持西班牙语、英语和葡萄牙语等。该插件检测客户端的区域设置并显示适当的翻译。
🔹 兼容性 & 性能:
优化的 IP → 协议缓存。
在 Spigot、Paper 和它们的衍生版本(用于 MOTD)上工作。
通过 xMotd 集成支持代理(BungeeCord / Velocity)。
🔹 额外的管理员工具:
内置 Modrinth 更新通知器。
通过 bStats 可选的使用统计信息。
高级调试模式,用于测试和故障排除。
✨ 通过 xBlocker,您将获得对服务器在客户端列表中显示方式以及如何处理版本不匹配的完全控制——所有这些都具有专业、多语言、无忧的体验。
## ✨ Config.yml ✨
```yaml
# _________ _____.__
# \_ ___ \ ____ _____/ ____\__| ____
# / \ \/ / _ \ / \ __\| |/ ___\
# \ \___( <_> ) | \ | | / /_/ >
# \______ /\____/|___| /__| |__\___ /
# \/ \/ /_____/
# Hecho con amor por 777 Studios - xPlugins
#
# Wiki y informacion: https//xblocker.willfry.net/
# =========================
# I18N (MULTI-LENGUAJE)
# =========================
i18n:
enabled: true # true = usar bundles /messages/*.yml
default-lang: "es_ES" # idioma por defecto
# PLAYER_LOCALE_THEN_DEFAULT: usa el locale del cliente; si no, default
# FIXED: fuerza el idioma en fixed-lang
mode: "PLAYER_LOCALE_THEN_DEFAULT"
fixed-lang: "es_ES" # usado si mode=FIXED
ping-lang: "es_ES" # idioma para PING/MOTD (no hay Player)
# Mapeos para normalizar locales reportados (ej. es -> es_ES)
locale-map:
es: "es_ES"
en: "en_US"
pt: "pt_BR"
# =========================
# Notificador de Actualizaciones (Modrinth) (No tocar)!!
# =========================
updates: # (No tocar)!!
modrinth: # (No tocar)!!
enabled: true # (No tocar)!!
project: "xblocked" # (No tocar)!!
# Comprobar cada X horas (>=1)
check-interval-hours: 1 # (No tocar)!!
notify: # (No tocar)!!
console: true
admins-on-join: true
permission: "xblocked.update"
# =========================
# bStats (No tocar)!!
# =========================
bstats:
enabled: true
plugin-id: 27316
# --- Compatibilidad de versiones ---
# Protocolo mínimo permitido (735 = MC 1.16.5; 763 = 1.20.1; 769 = 1.21.1, etc.)
min-protocol: 735
# Texto que se muestra a la DERECHA en la lista de servidores cuando
# el cliente es más antiguo que min-protocol o no coincide con el servidor.
# Se procesa con el mismo formato indicado en motd.format (auto/legacy/mini).
# NOTA: si i18n.enabled=true, se usará messages/.yml -> serverlist.incompatible.
# Este texto queda como FALLBACK si desactivas i18n.
incompatible-message: "&c ✖️ ¡Oye! 1.19.4 - 1.21x"
# --- Caché IP -> protocolo detectado (handshake) ---
cache-ttl-seconds: 45 # Tiempo de vida de la entrada
cache-soft-limit: 1000 # Límite suave de entradas (limpieza si se excede)
# Motd ( Solo para Spigot x paper ) Para velocity/bungee Usa xMotd
motd:
enabled: false # true para habilitar el MOTD personalizado
format: auto # auto | legacy | mini
center: true # centra cada línea (approx. por caracteres)
center-width: 50 # ancho usado para el centrado
# Si i18n.enabled=true y existe messages/.yml->motd.*, se prioriza ese contenido.
line1: "&cxBlocked &7| &fLobby"
line2: "&f¡Bienvenido!"
# --- Mensaje de desconexión en LOGIN (Outdated server/client) ---
disconnect:
enabled: true
# Si es true, solo reemplaza mensajes tipo “Outdated …”.
# Si es false, reemplaza cualquier kick de login por este mensaje.
only-on-version-mismatch: true
format: auto # auto | legacy | mini
# Placeholders disponibles:
# %server_version% -> versión del servidor (ej: git-Paper-196 (MC: 1.20.1))
# Si i18n.enabled=true, se usa messages/.yml->disconnect.incompatible (por jugador).
# Este texto queda como FALLBACK si desactivas i18n.
message: "✖ Servidor/cliente no coinciden. Usa %server_version% "
#### ##### #### # # #### ### #### ##### ### # #
# # # # # # # # # # # # # # # # ## #
# # ##### #### # # #### ##### # # # # # # # #
# # # # # # # # # # # # # # # # ##
#### ##### # ### # # # # #### ##### ### # #
debug: true # logs de handshake/ping/disconnect
debug-force-incompatible: false # fuerza el estado incompatible para
```
## ✨ Messages / 中文和英文
```yaml
# _____ ____ ____ ___________ |__| ____ ______
# / \_/ __ \ / \ / ___/\__ \ | |/ __ \ / ___/
# | Y Y \ ___/| | \\___ \ / __ \_ | \ ___/ \___ \
# |__|_| /\___ >___| /____ >(____ /\__| |\___ >____ >
# Hecho con amor por 777 Studios - xPlugins
# Usa colores HEX (<#RRGGBB>) o de Minecraft (&a, &b, etc.)
meta:
name: "English (US)"
version: 1
serverlist:
incompatible: "✖ Your version is not supported. Please use %server_version% "
disconnect:
incompatible: "✖ Server/client mismatch. Please use %server_version% "
motd:
line1: "GhostBlocker"
line2: "Professional connection control "
admin:
reloaded: "Config reloaded. "
```