Welcome to the Hangar Open Beta. Please report any issue you encounter on GitHub!
Avatar for ALingqing

Server plugin blocking Litematica's auto-place to prevent unfair building advantages.

Report AntiLitematica?

⚠️ ⚠️ WARNING / 警告 ⚠️

YOU MUST DOWNLOAD PROTOCOLLIB FIRST! / 必须先下载 ProtocolLib 前置插件!

Without ProtocolLib, this plugin will NOT work! / 没有 ProtocolLib,本插件无法运行!

Download / 下载: SpigotMC | Hangar | GitHub


AntiLitematica / 反投影辅助检测插件

🛡️ Detects & Blocks Litematica/Printer on Your Server | 检测并阻止 Litematica/Printer 投影打印

ProtocolLib-based packet analysis | 基于 ProtocolLib 的数据包分析


Features / 功能特性

Feature / 功能 Status / 状态 Description / 描述
Servux Channel Detection / 频道检测 Detects servux:litematics registration / 检测 servux:litematics 频道注册
Easy Place Detection / 快捷放置检测 Catches abnormal hit vectors (>1.5 rel) / 捕获异常点击向量(相对坐标>1.5)
NBT Query Block / NBT查询拦截 Blocks suspicious tag queries / 阻止可疑的标签查询
Printer Prevention / 打印阻止 Enforces raytrace + speed limits / 强制射线检测+速率限制
Low Overhead / 低性能开销 Async packet processing / 异步数据包处理

How It Works / 工作原理

English: This plugin uses ProtocolLib to intercept and analyze Minecraft protocol packets:

  1. Channel Registration Detection: Detects when client registers servux:litematics (Litematica 1.21.11+ Servux integration)
  2. Easy Place Vector Analysis: Calculates hitVec - blockPos relative coordinates; vanilla clients stay within [0..1], Litematica's Easy Place exceeds >2.0
  3. NBT Query Monitoring: Blocks unauthorized block entity/entity tag queries (debug features)
  4. Printer Prevention: Enforces server-side raytrace validation and placement speed limits (default: 14 blocks/sec) 简体中文: 本插件使用 ProtocolLib 拦截并分析 Minecraft 协议数据包:
  5. 频道注册检测: 检测客户端注册 servux:litematics(Litematica 1.21.11+ 的 Servux 集成)
  6. 快捷放置向量分析: 计算 hitVec - blockPos 相对坐标;原版客户端保持在 [0..1],Litematica 的 Easy Place 模式会超过 >2.0
  7. NBT 查询监控: 阻止未授权的方块实体/实体标签查询(调试功能)
  8. 打印阻止: 强制服务端射线检测验证和放置速率限制(默认:14方块/秒)

⚠️ HARD DEPENDENCY / 硬性依赖

ProtocolLib is REQUIRED / ProtocolLib 是必需的

Download Source / 下载源 URL
SpigotMC (Stable / 稳定版) https://www.spigotmc.org/resources/protocollib.1997/
Hangar (PaperMC Official / Paper官方) https://hangar.papermc.io/dmulloy2/ProtocolLib
GitHub Releases https://github.com/dmulloy2/ProtocolLib/releases
Dev Builds (CI / 开发版) https://ci.dmulloy2.net/job/ProtocolLib/
Supported Versions / 支持版本: 1.8 - 1.21.8

Installation / 安装方法

English:

  1. Install ProtocolLib FIRST (see links above) / 先安装 ProtocolLib(见上方链接)
  2. Place AntiLitematica.jar into /plugins folder / 将 AntiLitematica.jar 放入 /plugins 文件夹
  3. Restart server / 重启服务器
  4. Configure plugins/AntiLitematica/config.yml / 配置 plugins/AntiLitematica/config.yml 简体中文:
  5. 必须先安装 ProtocolLib(见上方链接)
  6. AntiLitematica.jar 放入 /plugins 文件夹
  7. 重启服务器
  8. 配置 plugins/AntiLitematica/config.yml

Configuration / 配置说明

# AntiLitematica Configuration / 配置文件
enabled: true
messages:
  prefix: "&7[&cAntiLitematica&7] "
  kick: "&c禁止使用 Litematica / Printer (或其网络指纹) 进入本服务器。"
  blocked_place: "&c请对准方块再放置 (禁止投影打印/自动放置)。"
detection:
  enabled: true
  # If client registers or sends data on these channels = suspicious/violation
  # Note: Litematica 1.21.11 includes Servux integration, may use `servux:litematics`
  # 如果客户端注册或在以下任意频道发送数据,则判定为可疑/违规
  channels:
    - "servux:litematics"
  # ProtocolLib-based signals / 基于 ProtocolLib 的额外信号
  signals:
    # Detects Litematica Servux metadata requests (VarInt type=2 + NBT["version"] contains "litematica")
    # 检测 Litematica 的 Servux metadata 请求
    servux_metadata:
      enabled: true
    # Detects Easy Place: encodes protocol data into hitVec, causing rel values >2 (vanilla: [0..1])
    # 检测"快捷放置":协议数据编码进点击向量,相对坐标远超正常范围
    easy_place:
      enabled: true
      rel_min: -0.5    # Minimum relative coordinate / 最小相对坐标
      rel_max: 1.5     # Maximum relative coordinate / 最大相对坐标
      cancel_packet: false  # Cancel or just flag / 取消数据包或仅标记
    # Blocks debug NBT queries (block entity/entity tag queries)
    # 阻止调试 NBT 查询(方块实体/实体标签查询)
    nbt_query:
      enabled: true
      allow_op: true   # Allow OP players / 允许 OP 玩家
      cancel_packet: true  # Cancel packet / 取消数据包
  # Actions: LOG (log only), KICK (kick player), BAN (ban name), COMMANDS (execute commands)
  # 处理方式:LOG(仅记录)、KICK(踢出)、BAN(封禁)、COMMANDS(执行指令)
  action: "KICK"
  reason: "Forbidden client mod detected (Litematica)."
  # COMMANDS mode only / 仅 COMMANDS 模式生效
  commands: []
  kick_after_commands: true
anti_printer:
  enabled: true
  apply_to_creative: true  # Also check creative mode / 同时检测创造模式
  # Forces server-side raytrace to hit the placement target block
  # 强制服务端射线检测必须命中放置目标方块
  enforce_raytrace: true
  reach_survival: 5.0      # Survival reach distance / 生存模式距离
  reach_creative: 6.0      # Creative reach distance / 创造模式距离
  extra_reach_allowance: 0.25  # Tolerance / 额外容差
  # Rate limit (blocks per second), 0 = disabled / 速率限制(方块/秒),0=关闭
  max_blocks_per_second: 14
  
  # Violation tracking / 违规追踪
  violations:
    window_ms: 8000    # Time window / 时间窗口(毫秒)
    kick_at: 8         # Kick threshold / 踢出阈值

Information

CategoryAdmin Tools
Published onFebruary 26, 2026
LicenseMIT
Download1
Stars1
Watchers0

Pinned Versions

Members