当检测到特定的游戏内事件时播放自定义视频——包括首次加入、死亡、击杀、进度达成、物品里程碑、记分板阈值等。
✨ 概览
选择一个条件,向其文件添加视频,模组便会在恰当的时刻播放它们。它适用于单人游戏、局域网以及专用服务器;在专用服务器上,由服务器决定播放内容并将视频文件发送给玩家。
- 来源: 本地文件、直接 URL、YouTube、Twitch、Kick、TikTok、SoundCloud 等,通过 WATERMeDIA 支持。
- 播放列表: 转场效果、循环播放、文字叠加、每个视频的独立音量、开始和结束时间。
- 等待室: 玩家在
firstJoin(首次加入)时互相等待,然后一起观看。
- 安全观看: 玩家在观看视频期间受到保护,且世界可以在所有人观看时暂停。
- 命令 用于在游戏中播放、停止、暂停和编辑视频,此外还为其他模组提供了 API。
🧩 依赖要求
| Minecraft |
Loaders |
Java |
| 1.20.1 |
Fabric, Forge |
17+ |
| 1.21.1 |
Fabric, NeoForge |
21+ |
| 1.21.11 |
Fabric, NeoForge |
21+ |
| 26.1.2 |
Fabric, NeoForge |
25+ |
| 26.2 |
Fabric, NeoForge |
25+ |
| 26.3 |
Fabric, NeoForge |
25+ |
通用依赖:
客户端依赖:
在 26.2 和 26.3 版本中,视频可在两种渲染器上播放,但 Vulkan 支持为实验性。OpenGL 是最稳妥的选择。
🎯 条件
| Condition |
触发时机 |
firstJoin |
玩家加入世界。它始终优先于任何其他条件播放。 |
playerDeath |
玩家死亡。 |
totemUsed |
不死图腾拯救了玩家。 |
bedSleep |
玩家开始睡觉。 |
deathByEntity |
特定实体杀死了玩家。优先级高于 playerDeath。 |
entityKilled |
玩家击杀了特定实体。 |
advancementCompleted |
玩家完成了某个进度。 |
dimensionChanged |
玩家进入了某个维度。 |
itemObtained |
玩家获得了某件物品。 |
itemCrafted |
玩家合成了某件物品。 |
recipeUnlocked |
玩家解锁了某个配方。 |
scoreboard |
分数满足比较条件。 |
worldPosition |
玩家进入或离开某个区域。 |
custom |
由命令或其他模组触发。 |
⌨️ 命令
适用于操作员(权限等级 2+)、命令方块和服务端控制台:
/conditionalvideos play <targets> <condition> [delay <seconds>] [exclude <players>] [excludeteam <team>] [excludeops] [once] [sync]
/conditionalvideos stop <targets>
/conditionalvideos pause <targets>
/conditionalvideos reset <targets> <condition | all>
/conditionalvideos set defaultvolume <volume>
/conditionalvideos set volume <condition> <video_index> <volume>
/conditionalvideos set conditiondelay <condition> <seconds>
/conditionalvideos set startat <condition> <video_index> <seconds>
/conditionalvideos set title <condition> <video_index> [at_position <x> <y>] <text>
/conditionalvideos set description <condition> <video_index> [at_position <x> <y>] <text>
/conditionalvideos set titleposition <condition> <video_index> <position | x y>
/conditionalvideos set descriptionposition <condition> <video_index> <position | x y>
/conditionalvideos waitingroom start [force]
/conditionalvideos waitingroom join [targets]
/conditionalvideos waitingroom leave [targets]
/conditionalvideos waitingroom add <targets>
/conditionalvideos waitingroom remove <targets>
🗂️ 配置
每个条件对应一个文件:
config/conditionalvideos/
├─ conditions/ 单人和局域网主机
│ ├─ firstJoin.json
│ ├─ entityKilled/minecraft/warden.json
│ ├─ advancementCompleted/minecraft/story/mine_diamond.json
│ ├─ scoreboard/kills.json
│ └─ worldPosition/spawn_area.json
└─ server-conditions/ 专用服务器,目录结构相同
更改会立即生效,对已连接的玩家也适用。模组会在文件顶部自动添加缺失的选项及其默认值,且不会修改你手动编写的内容。如果文件格式损坏,该文件将保持原样不动,并在日志和控制台中报错提示。旧版本的配置文件会在首次启动时自动迁移,原始文件会保留为 .bak 备份。
{
"repeatableInSameSession": false,
"videos": [
{
"source": "videos/intro.mp4",
"videoTitle": "&6&l欢迎",
"videoVolume": 0.8,
"nextAt": 8.0
},
{
"source": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"transition": "fadeOut/In"
}
]
}
条件选项
| 选项 |
默认值 |
描述 |
videos |
[] |
按顺序播放的视频列表。 |
repeatableInSameSession |
firstJoin 时为 false,其余情况为 true |
false 表示每位玩家在世界中仅播放一次。 |
playlistLoop |
false |
播放列表结束后重新开始。 |
conditionDelay |
0.0 |
播放前等待的秒数。 |
replayOnReconnect |
false |
重新连接时从开头再次播放中断的视频。 |
disableLoadingScreen |
false |
第一个视频在后台准备就绪,并在显示画面后出现。 |
protectPlayer |
true |
视频播放期间无伤害、饥饿、拾取或推挤效果。 |
freezeWorld |
firstJoin 时为 true,其余情况为 false |
所有已连接的玩家观看期间世界停止运行。 |
excludePlayers, excludeTeams |
[] |
永远看不到此条件的玩家和队伍。 |
excludeOps |
false |
管理员(OP)永远看不到此条件。 |
scoreboard 添加 value(默认 0)和比较器:equal、less、greater、lessOrEqual 或 greaterOrEqual(默认)。当比较结果为真时触发。
worldPosition 添加区域参数。若未指定 y,则覆盖任意高度,且 trigger 为 enter 或 exit:
{
"dimension": "minecraft:overworld",
"from": { "x": -20, "z": -20 },
"to": { "x": 20, "z": 20 },
"trigger": "enter",
"videos": [ { "source": "videos/zone.mp4" } ]
}
视频选项
| 选项 |
默认值 |
描述 |
source |
必填 |
本地路径(相对于游戏文件夹或绝对路径)或 URL。 |
skippable |
true |
玩家是否可以跳过该视频。 |
videoLoop |
false |
循环播放直到被跳过。强制启用 skippable。 |
enableBackground |
true |
在视频后方绘制纯色背景。 |
colorBackground |
#000000 |
#RRGGBB 或 #AARRGGBB 格式的颜色代码。 |
videoTitle, videoDescription |
空 |
支持颜色代码(&6, &l)的文本。\n 用于换行。 |
videoTitlePosition, videoDescriptionPosition |
bottomLeft |
可选值:topLeft、topRight、bottomLeft、bottomRight、center 或以像素为单位的 X/Y 坐标。负值表示从右侧和底部测量。 |
videoTitleAlignment, videoDescriptionAlignment |
left |
可选值:left、center 或 right。 |
titleTextScale, descriptionTextScale |
1.0 |
文字大小缩放比例。 |
textBoxOpacity |
自动 |
0.0–1.0,文字后方方框的不透明度。 |
videoVolume |
defaultVolume |
0.0–1.0。 |
transition |
cut |
从前一个视频进入的方式:cut(硬切)或 fadeOut/In(淡出/淡入)。 |
startAt |
0.0 |
开始播放的秒数。 |
nextAt |
视频结束 |
切换到下一个视频的秒数。 |
等候室
它是 firstJoin.json 中的 waitingRoom 区块。玩家在背景覆盖下等待,直到房间准备就绪,然后一起观看。单人模式或局域网主机不会进入,除非他们使用 waitingroom join 命令。
| 选项 |
默认值 |
描述 |
enabled |
false |
启用等候室功能。 |
requiredPlayers |
0 |
所需玩家数量。0 表示服务器的最大玩家数上限。 |
requiredPlayerNames, requiredTeams |
[] |
若设置,仅这些玩家进入并计入计数。 |
startMode |
auto |
auto 自动启动。op 等待管理员操作,管理员也可按空格键启动。 |
allowLeave |
false |
允许玩家通过跳过按键离开。 |
allowChat |
false |
允许玩家聊天。管理员始终可以聊天。 |
background |
#000000 |
#RRGGBB 颜色代码,或图片/GIF 的路径或 URL。 |
title, description, counter |
仅设置 counter |
房间文本。它们接受 %current_players%、%required_players% 和 %missing_players% 占位符。 |
titlePosition, titleAlignment, titleScale |
center, center, 1.0 |
description 和 counter 遵循相同的设置。 |
通用选项
config/conditionalvideos-common.json:
| 选项 |
默认值 |
描述 |
videoQuality |
AUTO |
或 LOWEST、LOWER、LOW、LOWISH、MEDIUM、HIGH、HIGHER、HIGHEST、ULTRA_8K。 |
defaultVolume |
1.0 |
没有单独音量设置的视频的音量。 |
videoLoadTimeoutSeconds |
180 |
等待视频开始的最长时间。最小值为 30。 |
alwaysShowCursor |
false |
视频播放期间永不隐藏光标。 |
allowGameSounds |
false |
视频播放期间保留其他音效继续播放。 |
blockMatureContent |
true |
阻止成人内容源。由每位玩家自行决定。 |
debugLogging |
false |
详细日志,用于故障排除。由每个安装实例自行决定。 |
在服务器上,它会为所有玩家设置前五个选项。
🎮 跳过视频
跳过键默认为 ESC,除非你在“选项 → 控制”中绑定 Skip video(跳过视频)。
- 轻按以跳到下一个视频。
- 按住直到进度条填满,然后松开以跳过整个播放列表。
🌍 语言与 API
提供英文和西班牙语(es_es、es_ar、es_mx)。其他模组可以通过 org.mateof24.conditionalvideos.api 中的 API 添加自定义条件并控制播放。
📜 许可证
ConditionalVideos License:任何服务器和任何免费整合包均可免费使用。对使用该模组的任何内容收费都需要获得许可。
Play custom videos when specific in-game events are detected — first joins, deaths, kills, advancements, item milestones, scoreboard thresholds, and more.
✨ Overview
Choose a condition, add videos to its file, and the mod plays them at the right moment. It works in singleplayer, on LAN and on dedicated servers, where the server decides what plays and sends its video files to the players.
- Sources: local files, direct URLs, YouTube, Twitch, Kick, TikTok, SoundCloud and more, through WATERMeDIA.
- Playlists: transitions, loops, text overlays, per-video volume, start and end times.
- Waiting room: players wait for each other on
firstJoin, then watch together.
- Safe to watch: players are protected during videos, and the world can freeze while everyone is watching.
- Commands to play, stop, pause and edit videos in-game, plus an API for other mods.
🧩 Requirements
| Minecraft |
Loaders |
Java |
| 1.20.1 |
Fabric, Forge |
17+ |
| 1.21.1 |
Fabric, NeoForge |
21+ |
| 1.21.11 |
Fabric, NeoForge |
21+ |
| 26.1.2 |
Fabric, NeoForge |
25+ |
| 26.2 |
Fabric, NeoForge |
25+ |
| 26.3 |
Fabric, NeoForge |
25+ |
Everywhere:
On the client:
On 26.2 and 26.3, videos play on both renderers, but Vulkan support is experimental. OpenGL is the safest choice.
🎯 Conditions
| Condition |
Plays when |
firstJoin |
The player joins the world. It always plays before anything else. |
playerDeath |
The player dies. |
totemUsed |
A Totem of Undying saves the player. |
bedSleep |
The player starts sleeping. |
deathByEntity |
A specific entity kills the player. Takes priority over playerDeath. |
entityKilled |
The player kills a specific entity. |
advancementCompleted |
The player completes an advancement. |
dimensionChanged |
The player enters a dimension. |
itemObtained |
The player gets an item. |
itemCrafted |
The player crafts an item. |
recipeUnlocked |
The player unlocks a recipe. |
scoreboard |
A score meets a comparison. |
worldPosition |
The player enters or leaves an area. |
custom |
A command or another mod fires it. |
⌨️ Commands
For operators (permission level 2+), command blocks and the server console:
/conditionalvideos play <targets> <condition> [delay <seconds>] [exclude <players>] [excludeteam <team>] [excludeops] [once] [sync]
/conditionalvideos stop <targets>
/conditionalvideos pause <targets>
/conditionalvideos reset <targets> <condition | all>
/conditionalvideos set defaultvolume <volume>
/conditionalvideos set volume <condition> <video_index> <volume>
/conditionalvideos set conditiondelay <condition> <seconds>
/conditionalvideos set startat <condition> <video_index> <seconds>
/conditionalvideos set title <condition> <video_index> [at_position <x> <y>] <text>
/conditionalvideos set description <condition> <video_index> [at_position <x> <y>] <text>
/conditionalvideos set titleposition <condition> <video_index> <position | x y>
/conditionalvideos set descriptionposition <condition> <video_index> <position | x y>
/conditionalvideos waitingroom start [force]
/conditionalvideos waitingroom join [targets]
/conditionalvideos waitingroom leave [targets]
/conditionalvideos waitingroom add <targets>
/conditionalvideos waitingroom remove <targets>
🗂️ Configuration
Each condition is a file:
config/conditionalvideos/
├─ conditions/ singleplayer and LAN host
│ ├─ firstJoin.json
│ ├─ entityKilled/minecraft/warden.json
│ ├─ advancementCompleted/minecraft/story/mine_diamond.json
│ ├─ scoreboard/kills.json
│ └─ worldPosition/spawn_area.json
└─ server-conditions/ dedicated server, same layout
Changes apply right away, also for connected players. The mod adds any missing option with its default at the top of the file and never changes what you wrote. A broken file is left untouched and reported in the log and in the chat. Configs from older versions migrate on the first launch and the originals stay as .bak.
{
"repeatableInSameSession": false,
"videos": [
{
"source": "videos/intro.mp4",
"videoTitle": "&6&lWelcome",
"videoVolume": 0.8,
"nextAt": 8.0
},
{
"source": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"transition": "fadeOut/In"
}
]
}
Condition options
| Option |
Default |
Description |
videos |
[] |
The videos, played in order. |
repeatableInSameSession |
false on firstJoin, true on the rest |
false plays once per player and world. |
playlistLoop |
false |
Restarts the playlist when it ends. |
conditionDelay |
0.0 |
Seconds to wait before playing. |
replayOnReconnect |
false |
Plays an interrupted video again from the start on reconnect. |
disableLoadingScreen |
false |
The first video gets ready in the background and appears once it has a picture. |
protectPlayer |
true |
No damage, hunger, pickups or pushing during the video. |
freezeWorld |
true on firstJoin, false on the rest |
The world stops while every connected player is watching. |
excludePlayers, excludeTeams |
[] |
Players and teams that never see this condition. |
excludeOps |
false |
Operators never see this condition. |
scoreboard adds value (default 0) and comparator: equal, less, greater, lessOrEqual or greaterOrEqual (default). It fires when the comparison becomes true.
worldPosition adds the area. Without y it covers any height, and trigger is enter or exit:
{
"dimension": "minecraft:overworld",
"from": { "x": -20, "z": -20 },
"to": { "x": 20, "z": 20 },
"trigger": "enter",
"videos": [ { "source": "videos/zone.mp4" } ]
}
Video options
| Option |
Default |
Description |
source |
Required |
Local path (relative to the game folder or absolute) or URL. |
skippable |
true |
Whether the player can skip it. |
videoLoop |
false |
Loops until skipped. Forces skippable. |
enableBackground |
true |
Draws a solid color behind the video. |
colorBackground |
#000000 |
#RRGGBB or #AARRGGBB. |
videoTitle, videoDescription |
Empty |
Text with color codes (&6, &l). \n breaks the line. |
videoTitlePosition, videoDescriptionPosition |
bottomLeft |
topLeft, topRight, bottomLeft, bottomRight, center or X/Y in pixels. Negative values measure from the right and bottom. |
videoTitleAlignment, videoDescriptionAlignment |
left |
left, center or right. |
titleTextScale, descriptionTextScale |
1.0 |
Text size. |
textBoxOpacity |
Automatic |
0.0–1.0, opacity of the box behind the text. |
videoVolume |
defaultVolume |
0.0–1.0. |
transition |
cut |
How it enters from the previous video: cut or fadeOut/In. |
startAt |
0.0 |
Second where it starts. |
nextAt |
Video end |
Second where it moves on to the next video. |
Waiting room
It is the waitingRoom block in firstJoin.json. Players wait covered by the background until the room is ready, then watch together. A singleplayer or LAN host doesn't enter unless they use waitingroom join.
| Option |
Default |
Description |
enabled |
false |
Turns the room on. |
requiredPlayers |
0 |
Players needed. 0 means the server's maximum. |
requiredPlayerNames, requiredTeams |
[] |
If set, only these players enter and count. |
startMode |
auto |
auto starts by itself. op waits for an operator, who can also press Space. |
allowLeave |
false |
Lets players leave with the skip key. |
allowChat |
false |
Lets players chat. Operators always can. |
background |
#000000 |
#RRGGBB, or the path or URL of an image or GIF. |
title, description, counter |
Only counter is set |
Room texts. They accept %current_players%, %required_players% and %missing_players%. |
titlePosition, titleAlignment, titleScale |
center, center, 1.0 |
Same for description and counter. |
Common options
config/conditionalvideos-common.json:
| Option |
Default |
Description |
videoQuality |
AUTO |
Or LOWEST, LOWER, LOW, LOWISH, MEDIUM, HIGH, HIGHER, HIGHEST, ULTRA_8K. |
defaultVolume |
1.0 |
Volume of videos without their own. |
videoLoadTimeoutSeconds |
180 |
How long to wait for a video to start. Minimum 30. |
alwaysShowCursor |
false |
Never hides the cursor during a video. |
allowGameSounds |
false |
Keeps other sounds playing during videos. |
blockMatureContent |
true |
Blocks mature sources. Each player's own choice. |
debugLogging |
false |
Detailed log, for troubleshooting. Each installation's own choice. |
On a server, it sets the first five for its players.
🎮 Skipping videos
The skip key is ESC until you bind Skip video in Options → Controls.
- Tap to skip to the next video.
- Hold until the bar fills, then release to skip the whole playlist.
🌍 Languages and API
Available in English and Spanish (es_es, es_ar, es_mx). Other mods can add custom conditions and control playback through the API in org.mateof24.conditionalvideos.api.
📜 License
ConditionalVideos License: free for any server and any free modpack. Charging for anything that uses the mod requires permission.
评论 0
登录后参与评分
还没有评论,来抢沙发吧