跳到主要内容

Protection

Protection 扩展为传统的圈地插件提供了一个强大而灵活的替代方案。它允许创建带有特定规则(旗标)的复杂区域,用以管理玩家行为、环境事件和生物机制。

功能

  • 几何区域 — 支持长方体、圆柱体和多边形(棱柱)形状。
    • 层级优先级 — 区域可以重叠,优先级更高的区域会覆盖较低的区域。
    • 继承系统 — 子区域可以继承父区域的旗标,或对其进行覆盖。
    • 完整旗标 — 60 多个旗标,涵盖建造权限、PvP、生物生成等。

条目

核心元素

事件与逻辑

  • Enter/Exit Region — 当玩家跨越区域边界时触发逻辑。
    • In Region Fact — 检查玩家当前是否处于特定的受保护区域内。
    • Region Audience — 向区域内的所有人展示持续的视觉或音频内容。

快速开始

  • 1. 创建存储 — 添加产物条目以持久化数据:global→ global
  • 2. 响应事件 — 使用事件条目在事情发生时触发机制:boundary→ boundary
  • 3. 用事实检查状态 — 将事实条目用作条件:在触发动作前检查等级、数量或玩家状态。→ in_region

命令

所有命令都在 /protection 前缀下(别名:/pt/region)。

命令说明Permission
/protection list列出所有活动区域及其优先级typewriter.protection
/protection edit <id>进入某个区域的选择模式typewriter.protection
/protection apply保存当前选区并最终确定区域typewriter.protection
/protection info <id>查看区域的技术细节与位置typewriter.protection
/protection flags <id>分析生效、继承和被阻止的旗标typewriter.protection
/protection inspect切换区域边界的调试可视化typewriter.protection
/protection import-we <id>将当前 WorldEdit 选区导入为区域typewriter.protection

占位符

所有占位符都使用前缀 %typewriter_regions:%

占位符说明
%typewriter_regions:count%玩家当前所处的区域数量
%typewriter_regions:list%以逗号分隔的活动区域 ID 列表
%typewriter_regions:primary:name%当前位置优先级最高的区域名称
%typewriter_regions:flag:<flag_id>%某个特定旗标的生效值(例如 pvp
%typewriter_regions:has:<id1>,<id2>%玩家处于所列任一区域时为 true
%typewriter_regions:active:<index>:id%堆栈中第 N 个区域的 ID

外部依赖

Extension类型功能
FastAsyncWorldEdit可选区域选择与几何操作。
MythicMobs可选区域内生物生成的高级控制。
BtcMobs可选区域内生物生成的高级控制。

权限

Permission说明
typewriter.protection保护命令的基础访问权限。
typewriter.protection.admin管理受保护区域。
typewriter.protection.bypass绕过保护限制。