Item-lock

插件

· 作者 clre20

高安全性貴重物品保護插件。採用零信任純存儲白名單與智慧組件遮罩引擎,阻斷非法的合成、加工、偷換、複製與意外遺失。

0 本站下载 0 关注 更新于 3 周前

最新 2.4.0 · 26.3 · Paper / Purpur

一键开服(送7天)

Item-lock


Item-lock 是一款针对 Minecraft Paper 及 Purpur 服务器端(1.21+)设计的物品保护插件。通过纯存储容器白名单与动态组件比对,防止服务器特殊物品(如任务道具、自定义装备、代币货币)在未经授权的界面中遭到修改、附魔、加工、复制或意外丢失。

主要功能

  • 动态组件特征比对

    • 材质过滤:以物品材质进行快速初筛;针对已绘制地图(FILLED_MAP)精准比对内部 map_id。
    • 动态数值遮罩:比对时自动屏蔽游戏常态变动数值(将耐久消耗 damage 与铁砧修复惩罚 repair_cost 归零后再比对),确保物品磨损或维修后仍能正常匹配。
    • 特征指纹验证:比对 Custom Model Data、自定义名称、Lore、附魔列表与 Persistent Data Container (PDC) 标签。
  • 纯存储容器白名单防护

    • 仅允许受保护物品存放在以下纯存储用途之容器:
      • 箱子、双箱、陷阱箱(限世界真实方块实体)
      • 木桶
      • 潜影盒(已放置之方块,或设定放行之虚拟潜影盒)
      • 末影箱
      • 玩家自身背包
    • 当玩家开启非白名单界面(如铁砧、砂轮、铁匠台、制图台、熔炉,以及各类非纯存储的外挂自定义界面)时,拦截鼠标放置、Shift 快速移入、数字键置换与鼠标拖曳涂抹操作。
  • 游戏内 GUI 管理系统 (v2.1+)

    • 样本库浏览界面 (/itemlock gui 或 /itemlock list):54 格分页箱子界面,清楚陈列所有已注册的受保护物品、材质与个别防护开关摘要。
    • 个别样本设定界面 (/itemlock edit <名称>):27 格箱子界面,管理员可自由针对单一物品调整各项防护开关(三态切换:继承全域 / 强制开启 / 强制关闭),并支持取得样本副本或删除样本。
  • 副手与世界互动安全

    • 副手防护:拦截 F 换手、基岩版 /geyser offhand 指令与背包副手槽移入。若因未知途径残留于副手,系统将在切换手持或关闭界面时自动移回主背包。
    • 方块防放:禁止玩家将受保护的方块类物品作为方块放置到世界上。
    • 合成防拓印:当 3x3 工作台或 2x2 随身合成矩阵中包含受保护物品时,自动清空合成产物并取消事件,防止地图复制或配方加工。
    • 非容器方块交互防护:手持受保护物品右键非纯存储方块(如祭坛、大锅、附魔台)时取消交互。
    • 实体交互防护:禁止将受保护物品放入展示框、发光展示框或装备在盔甲架上。
    • 丢弃防护:可选开启禁止按 Q 丢弃。掉落实体生成时自动赋予火焰、岩浆、爆炸伤害免疫,并禁止生物拾取。
  • 自动化物流管制

    • 支持独立设定是否允许漏斗或漏斗矿车自容器中抽取并传输受保护物品,以及地面漏斗是否可吸取掉落的受保护物品。
  • 第三方插件兼容支持

    • Shopkeepers:原生支持村民商店,允许受保护物品作为货币或商品交易,并支持在店主设定界面中进行配方配置。
    • eShulkerBox:支持在手持或随身开启的潜影盒界面中安全存取受保护物品。
  • 防幽灵物品与操作反馈

    • 拦截操作时于屏幕正下方显示 Actionbar 提示并播放拒绝音效(具备冷却防刷保护)。
    • 拦截后于下 1 个 Tick 自动调度执行 player.updateInventory(),强制对齐服务器与客户端数据,消除幽灵物品。

指令与权限说明

权限节点:itemlock.admin(默认为 OP Level 2)

指令语法 参数说明 功能说明
/itemlock help 无 显示指令说明手册。
/itemlock gui 无 开启 54 格受保护物品样本库管理箱界面。
/itemlock list 无 查看所有已注册的受保护样本(玩家执行将自动开启 GUI;控制台显示文本列表)。
/itemlock edit <名称> 样本名称 开启指定样本的 27 格个别属性设定界面。
/itemlock add <名称> [-f] 样本名称 (可选 -f) 将主手手持物品注册为受保护样本(耐久与修复惩罚自动规范化)。已存在时需加上 -f 强制覆盖。
/itemlock remove <名称> 已存在的样本名称 自磁盘文件与内存缓存中删除指定样本。
/itemlock check 无 检测主手物品是否受保护,并显示所匹配的样本名称。
/itemlock reload 无 重新载入全域配置文件与所有样本文件至内存缓存。

English

Item-lock is an item protection plugin for Paper and Purpur Minecraft servers (1.21+). It protects designated items (such as unique quest items, RPG gear, or custom currency) from accidental loss, unauthorized modification, crafting, and grinding by restricting interactions to whitelisted storage containers.

Key Features

  • Component-Aware Item Matching

    • Material Filter: Fast preliminary check by item material. Filled maps (FILLED_MAP) are matched by their internal map_id.
    • Dynamic Masking: Normalizes gameplay wear components (resets minecraft:damage and anvil minecraft:repair_cost during comparison), ensuring used or repaired items remain protected.
    • Fingerprint Verification: Compares Custom Model Data, display name, lore, enchantments, and Persistent Data Container (PDC) tags.
  • Storage Whitelist Container Safety

    • Restricts protected item transfers strictly to pure storage blocks:
      • Chests, Trapped Chests, and Double Chests (physical world blocks only)
      • Barrels
      • Shulker Boxes (placed physical blocks, or whitelisted virtual menus)
      • Ender Chests
      • Player Inventory
    • Prevents depositing protected items into non-storage interfaces (such as anvils, grindstones, smithing tables, cartography tables, furnaces, or unauthorized custom plugin menus) via clicking, shift-clicking, hotbar number keys, or drag-painting.
  • In-Game GUI Management (v2.1+)

    • Template Browser (/itemlock gui or /itemlock list): A 54-slot paginated chest GUI displaying all registered templates, their materials, and active protection toggles.
    • Per-Item Settings (/itemlock edit <id>): A 27-slot chest GUI allowing administrators to adjust individual protection settings using tri-state toggles (Inherit Global / Enforce True / Enforce False), acquire a duplicate sample item, or safely delete a template.
  • Offhand & World Interaction Safeguards

    • Offhand Restriction: Prevents moving protected items to the offhand slot via keybinds (F key), Bedrock /geyser offhand commands, or shift-clicking. Automatically returns residual offhand items to the main inventory.
    • Block Placement Guard: Prevents players from placing protected block-type items into the physical world.
    • Crafting Protection: Clears the output and cancels crafting if a protected item is placed inside a 3x3 crafting table or 2x2 player inventory grid (prevents vanilla map cloning and recipes).
    • Non-Storage Block Interaction: Cancels right-click interactions on non-storage blocks (e.g. cauldrons, enchanting tables) while holding protected items.
    • Entity Interaction: Prevents inserting protected items into item frames, glowing item frames, or armor stands.
    • Drop Protection: Optional toggle to prevent dropping via the Q key. Dropped entities receive immunity against fire, lava, explosions, and mob pickup.
  • Logistics & Hoppers

    • Configurable controls for hoppers and hopper minecarts to allow or prevent transferring (hopper.allow-move) and picking up (hopper.allow-pickup) protected items.
  • Third-Party Compatibility

    • Shopkeepers: Built-in support allowing protected items to be used as trading currency or items, and allowing configuration in the Shopkeepers editor menu.
    • eShulkerBox: Allows storing and retrieving protected items within handheld or virtual shulker box interfaces.
  • Player Feedback & Anti-Desync

    • Displays Actionbar notifications and plays refusal sounds when an illegal action is blocked.
    • Automatically schedules player.updateInventory() on the next tick to prevent client-side ghost item desynchronization.

Commands & Permissions

Permission Node: itemlock.admin (Default: OP Level 2)

命令 参数 描述
/itemlock help 无 显示命令帮助菜单。
/itemlock gui 无 打开包含 54 个槽位的模板浏览器图形用户界面(GUI)。
/itemlock list 无 查看所有已注册的模板(为玩家时打开 GUI;在控制台输出文本)。
/itemlock edit <name> 模板名称 为指定模板打开包含 27 个槽位的独立设置编辑器图形用户界面(GUI)。
/itemlock add <name> [-f] 模板名称(可选 -f) 将主手所持物品注册为模板。耐久度和修复成本会自动标准化。使用 -f 可覆盖现有模板。
/itemlock remove <name> 模板名称 从磁盘和内存中移除已注册的模板。
/itemlock check 无 检查主手物品是否受到保护,并显示其模板 ID。
/itemlock reload 无 重新加载 config.yml 及所有模板 YAML 文件至内存。

你是这个资源的作者?登录后可认领此资源。

评论 0

0.0
暂无评分
5 星
0
4 星
0
3 星
0
2 星
0
1 星
0
我的评分

登录后参与评分

还没有评论,来抢沙发吧

评论配图

相似资源