Skip to content

触发器 - Trigrex

插件购买

售价:68 元,永久使用

插件介绍

Trigrex 一款轻量化事件监听与触发器框架,通过简洁配置实现复杂逻辑处理,兼顾执行效率与多场景适配能力

  • 灵活的条件
    提供区域、权限、变量、状态、数值等多种判断,支持组合与嵌套,实现复杂逻辑

  • 多样的动作
    条件达成后可执行消息、指令、物品掉落、事件拦截、变量修改等操作

  • 丰富触发源
    支持 60+ 种玩家行为及事件监听,包括方块、实体、战斗、交互、移动、定时任务等

应用示例

  • 禁止指定世界的方块放置、破坏行为
  • 定时为某区域、条件的玩家执行奖励
  • 聊天包含指定关键词执行特定操作
  • 击杀怪物、破坏方块的额外掉落规则
  • 进入指定区域增加失明、迟缓等药水效果

怪物掉落

yaml
example:
  type: kill-mob
  # 怪物条件
  mob:
    - "恶魔士兵"
  # 掉落物
  drop:
    - "mm 恶魔士兵碎片 5"
    - "mm 恶魔士兵核心 1~3 0.1"
  # 自动拾取
  auto-pickup: true
  # 掉落物所有者,非所有者无法拾取
  drop-owner: true

挖掘掉落

yaml
example:
  type: block-break
  # 方块条件
  block:
    - DIAMOND_ORE
  # 额外掉落物
  drop:
    - "mc APPLE 1"

消耗物品

yaml
example:
  type: right,left
  # 触发条件
  condition:
    - "match.name('测试药水')"
  # 取消触发器相关事件
  cancel: true
  action:
    - 扣除数量(1)
    - 执行指令('heal %player_name%')
  cooldown: 0.5
  cooldown-action:
    - 消息('{prefix}§e药水使用频繁')

世界保护

yaml
example:
  # 禁止破坏、放置
  type: block-break,block-place
  # 位置条件,可配置区域、坐标或世界
  position:
    - "world"
    - "fb1"
    - "fb2"
  # 仅对不满足权限(非OP)玩家生效
  cooldown:
    - "!判断权限('test.test')"
  action:
    - 消息('{prefix}&7这里不能破坏或放置方块')
  cancel: true

挂机奖励

yaml
挂机奖励:
  type: timer
  position: world,4~12,5~9,4~12
  # 执行周期
  period: 60s
  # 自行配置奖励
  action:
    - "执行指令('eco give %player_name% 1000')"
进入区域提示:
  type: region
  region: world,4~12,5~9,4~12
  action:
    - 消息('{prefix}&a已进入挂机池区域')

快捷菜单

yaml
example:
  type: right,left
  condition:
    - "match.type('CLOCK') || match.name('菜单')"
  # 取消触发器相关事件
  cancel: true
  # 触发动作
  action:
    - 执行指令('player:cx open 1')

NPC指令

yaml
example:
  # Adyeshach NPC交互: ady
  # Citizens NPC交互: npc-left,npc-right
  type: ady
  npc: 101
  action:
    - 执行指令('cc open 跨服菜单')

击杀提示

yaml
example:
  type: kill-player
  action:
    - 物品展示('{prefix}&7玩家 &f{entity-name} &7被 &f%player_name% &7使用 ${获取物品名()} &7击杀')

自动公告

yaml
example:
  type: timer
  # 执行周期
  period: 120s
  entry:
    文本0: "&e[&9飞鸽传书&e] &6服务器严禁私下RMB交易行为,如经发现,后果自负"
    文本1: "&e[&9飞鸽传书&e] &6如果觉得服务器好玩的话,记得叫上小伙伴一块来玩"
    文本2: "&e[&9飞鸽传书&e] &6本服一切赞助为有偿赞助,不支持退款服务"
    文本3: "&e[&9飞鸽传书&e] &6前往 商店街 购买药剂 让你的肝更轻松一些"
    随机: "{文本${random(4)}}"
  action:
    - 消息('{随机}')

Cron

yaml
example:
  type: cron
  cron: "0/30 * * * * ?"
  action:
    - 消息('定时执行')

脚本方块

yaml
example:
  type: right
  position: demo,-24~100,64,-1~2
  cancel: true
  action:
    - 消息('你点击了我')

事件监听

yaml
example:
  # 物品丢弃事件
  listen: PlayerDropItemEvent
  cancel: true
  action:
    - 消息('禁止丢弃')

进入区域

yaml
example:
  type: region
  region: demo,3~10,59~65,-20~-2
  action:
    - 消息('&a已进入区域')

离开区域

yaml
example:
  type: region-end
  region: demo,3~10,59~65,-20~-2
  action:
    - 消息('&c离开区域')

GUI限制

yaml
example:
  type: inventory-open
  condition:
    - 文本.是否包含('{inventory-type}','ENCHANTING','其它1','其它2')
  action:
    - 消息('{prefix}&7禁止使用')
  cancel: true

禁止合成

yaml
example:
  type: craft
  condition:
    - match.type('HOPPER')
  action:
    - 消息('{prefix}&7禁止合成')
  cancel: true

禁止附魔

yaml
example:
  type: enchant
  action:
    - 消息('{prefix}&7禁止附魔')
  cancel: true