mmoitem设计一个即死印记物品 需要在12秒内消除 否则会死亡并设计一个取消即死标记的一次性物品 给我他们的mmoitem配置和mythicmobs的配置并细致的教我如何添加他们到游戏中
即死印记物品配置:
item:
type: diamond
name: "&c即死印记"
lore:
- "&7这个印记会在12秒后"
- "&7让你死亡,小心使用!"
customModelData: 1
flags: [hide_attributes]
abilities:
onTick:
cancel: true # 取消物品的默认效果
actions:
- execute-command:
command: "title @s times 1 20 1" # 在玩家屏幕上显示倒计时
- delay: 240 # 12秒的倒计时
- execute-command:
command: "kill @s" # 超时后杀死玩家
取消即死标记的一次性物品配置:
item:
type: paper
name: "&a即死标记取消器"
lore:
- "&7使用这个物品可以"
- "&7取消即死标记的效果"
customModelData: 2
flags: [hide_attributes]
abilities:
onUse:
cancel: true # 取消物品的默认效果
actions:
- execute-command:
command: "execute as @s[tag=has_death_tag] run tag @s remove has_death_tag" # 移除即死标记
- execute-command:
command: "execute as @s run title @s title \"&a已取消即死标记!\"" # 在玩家屏幕上提示
MythicMobs的配置:
- name: InstantDeathMob
health: 1
damage: 0
experience: 0
drops: []
skills:
onSpawn:
- execute-command:
command: "tag @s add has_death_tag" # 给怪物打上即死标记
- item-spawn:
item: diamond # 掉落即死印记
amount: 1
chance: 100
damage: 0
onDeath:
- item-spawn:
item: paper # 掉落即死标记取消器
amount: 1
chance: 100
damage: 0
将以上配置写入对应的mmoitem.yml和MythicMobs的配置文件中后,在游戏中使用以下命令来重新加载配置文件:
/mythicmobs reload
/mmoitem reload
然后就可以在游戏中找到这两个物品了。记住,使用即死印记后,需要在12秒内使用即死标记取消器来避免死亡!
原文地址: https://www.cveoy.top/t/topic/bGD2 著作权归作者所有。请勿转载和采集!