Settings\EventCommands.yml 中文注释版🔗
本页为 CMI 插件事件命令(EventCommands)系统配置说明,对应配置文件
Settings/EventCommands.yml。
在特定事件时执行的命令 完整支持颜色代码和一些变量 如果命令以
msg!开头并给出玩家名,则如果该玩家在线,会向该玩家发送简单消息 如果命令以broadcast!开头,则会以简单方式向服务器上的所有玩家发送消息 如果命令以actionbar!开头,则所有玩家都会收到此变量之后定义的动作栏消息 如果命令以title!开头,则所有玩家都会收到此变量之后定义的标题消息 如果命令以subtitle!开头,则所有玩家都会收到此变量之后定义的副标题消息 如果命令以kickall!开头,则所有玩家都会以定义的消息被踢出服务器。在服务器停止前非常有用 如果命令以perm:[权限节点]!开头,则当玩家拥有该权限节点时会执行命令。当我们不知道目标玩家是谁时,这将无法生效。示例:perm:cmi.announce.vip! broadcast! Hello vip guys[playerName]插入目标玩家名[playerDisplayName]插入目标玩家的显示名[lvl]插入玩家等级[exp]插入玩家总经验[hp]插入玩家生命值[maxHp]插入玩家最大生命值[hunger]插入玩家饥饿值[gameMode]插入玩家游戏模式 请注意,joinServer命令不会在firstJoinServer事件时执行 注意!过度使用重型命令可能会导致服务器负载增加。尽量为每个事件少用这些命令 如果可能,请使用delay! 0.3或类似变量将它们错开延迟执行 这将让服务器有时间跟上计算,而不是强迫它一次性执行所有这些命令
事件命令列表🔗
firstJoinServer(首次加入服务器)🔗
Enabled — false
是否启用此事件
Commands — (命令列表)
事件触发时执行的命令
Commands:
- cmi msg [playerName] !This is event command example!
- cmi msg [playerName] !Originates from sneakingSwapHandItems event!
joinServer(加入服务器)🔗
Enabled — false
是否启用此事件
Commands — (命令列表)
事件触发时执行的命令
Commands:
- cmi msg [playerName] !This is event command example!
- cmi msg [playerName] !Originates from sneakingSwapHandItems event!
quitServer(退出服务器)🔗
Enabled — false
是否启用此事件
Commands — (命令列表)
事件触发时执行的命令
Commands:
- cmi msg [playerName] !This is event command example!
- cmi msg [playerName] !Originates from sneakingSwapHandItems event!
playerDeath(玩家死亡)🔗
Enabled — false
是否启用此事件
Commands — (命令列表)
事件触发时执行的命令
Commands:
- cmi msg [playerName] !This is event command example!
- cmi msg [playerName] !Originates from sneakingSwapHandItems event!
SourceCommands — (命令列表)
来源相关命令列表(当前为空)
playerKillPlayer(玩家击杀玩家)🔗
[sourceName]插入来源玩家名[sourceDisplayName]插入来源玩家的显示名[sourceLvl]插入来源玩家等级[sourceExp]插入来源玩家总经验[sourceHp]插入来源玩家生命值[sourceMaxHp]插入来源玩家最大生命值[sourceHunger]插入来源玩家饥饿值[sourceGameMode]插入来源玩家游戏模式 请注意,如果你使用了专用命令,则Commands部分将在死亡的玩家身上执行,SourceCommands将在击杀者身上执行
Enabled — false
是否启用此事件
Commands — (命令列表)
事件触发时执行的命令
Commands:
- cmi msg [playerName] !This is event command example!
- cmi msg [playerName] !Originates from sneakingSwapHandItems event!
SourceCommands — (命令列表)
在击杀者身上执行的命令列表(当前为空)
playerRespawn(玩家重生)🔗
Enabled — false
是否启用此事件
Commands — (命令列表)
事件触发时执行的命令
Commands:
- cmi msg [playerName] !This is event command example!
- cmi msg [playerName] !Originates from sneakingSwapHandItems event!
playerTeleport(玩家传送)🔗
Enabled — false
是否启用此事件
Commands — (命令列表)
事件触发时执行的命令
Commands:
- cmi msg [playerName] !This is event command example!
- cmi msg [playerName] !Originates from sneakingSwapHandItems event!
bedLeave(离开床)🔗
Enabled — false
是否启用此事件
Commands — (命令列表)
事件触发时执行的命令
Commands:
- cmi msg [playerName] !This is event command example!
- cmi msg [playerName] !Originates from sneakingSwapHandItems event!
bedEnter(上床)🔗
Enabled — false
是否启用此事件
Commands — (命令列表)
事件触发时执行的命令
Commands:
- cmi msg [playerName] !This is event command example!
- cmi msg [playerName] !Originates from sneakingSwapHandItems event!
playerWorldChange(玩家世界改变)🔗
Enabled — false
是否启用此事件
Commands — (命令列表)
事件触发时执行的命令
Commands:
- cmi msg [playerName] !This is event command example!
- cmi msg [playerName] !Originates from sneakingSwapHandItems event!
playerPreWorldChange(玩家世界改变前)🔗
Enabled — false
是否启用此事件
Commands — (命令列表)
事件触发时执行的命令
Commands:
- cmi msg [playerName] !This is event command example!
- cmi msg [playerName] !Originates from sneakingSwapHandItems event!
playerGameModeChange(玩家游戏模式改变)🔗
Enabled — false
是否启用此事件
Commands — (命令列表)
事件触发时执行的命令
Commands:
- cmi msg [playerName] !This is event command example!
- cmi msg [playerName] !Originates from sneakingSwapHandItems event!
playerKick(玩家被踢出)🔗
Enabled — false
是否启用此事件
Commands — (命令列表)
事件触发时执行的命令
Commands:
- cmi msg [playerName] !This is event command example!
- cmi msg [playerName] !Originates from sneakingSwapHandItems event!
playerBan(玩家被封禁)🔗
Enabled — false
是否启用此事件
Commands — (命令列表)
事件触发时执行的命令
Commands:
- cmi msg [playerName] !This is event command example!
- cmi msg [playerName] !Originates from sneakingSwapHandItems event!
playerLevelChange(玩家等级改变)🔗
Enabled — false
是否启用此事件
Commands — (命令列表)
事件触发时执行的命令
Commands:
- cmi msg [playerName] !This is event command example!
- cmi msg [playerName] !Originates from sneakingSwapHandItems event!
voidFall(虚空坠落)🔗
Enabled — false
是否启用此事件
Commands — (命令列表)
事件触发时执行的命令
Commands:
- cmi msg [playerName] !This is event command example!
- cmi msg [playerName] !Originates from sneakingSwapHandItems event!
elytraStartGlide(鞘翅开始滑翔)🔗
Enabled — false
是否启用此事件
Commands — (命令列表)
事件触发时执行的命令
Commands:
- cmi msg [playerName] !This is event command example!
- cmi msg [playerName] !Originates from sneakingSwapHandItems event!
advancementDone(完成进度)🔗
使用
[value]变量插入进度的标识符,如husbandry/balanced_diet使用[value2]变量插入进度的名称,如'A Balanced Diet'
Enabled — false
是否启用此事件
Commands — (命令列表)
事件触发时执行的命令
Commands:
- cmi msg [playerName] !This is event command example!
- cmi msg [playerName] !Originates from sneakingSwapHandItems event!
elytraEndGlide(鞘翅结束滑翔)🔗
Enabled — false
是否启用此事件
Commands — (命令列表)
事件触发时执行的命令
Commands:
- cmi msg [playerName] !This is event command example!
- cmi msg [playerName] !Originates from sneakingSwapHandItems event!
sneakingSwapHandItems(潜行时交换主手副手物品)🔗
Enabled — false
是否启用此事件
CancelEvent — false
如果需要,可以取消物品交换事件。这仅在事件监听器启用时生效
Commands — (命令列表)
事件触发时执行的命令
Commands:
- cmi msg [playerName] !This is event command example!
- cmi msg [playerName] !Originates from sneakingSwapHandItems event!
swapHandItems(交换主手副手物品)🔗
Enabled — false
是否启用此事件
Commands — (命令列表)
事件触发时执行的命令
Commands:
- cmi msg [playerName] !This is event command example!
- cmi msg [playerName] !Originates from sneakingSwapHandItems event!
pvpstart(PVP 开始)🔗
Enabled — false
是否启用此事件
Commands — (命令列表)
事件触发时执行的命令
Commands:
- cmi msg [playerName] !This is event command example!
- cmi msg [playerName] !Originates from sneakingSwapHandItems event!
pvpend(PVP 结束)🔗
Enabled — false
是否启用此事件
Commands — (命令列表)
事件触发时执行的命令