在检测到特定的游戏内事件时播放自定义视频——包括首次加入、死亡、击杀、进度达成、物品里程碑、计分板阈值等。
✨ 概览
选择一个条件,将视频添加到其配置文件中,模组便会在恰当的时刻播放它们。支持单人游戏、局域网联机以及专用服务器;在专用服务器上,由服务端决定播放内容并将视频文件发送给玩家。
- 来源: 本地文件、直接 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.2 版本中,视频可在两种渲染器上播放,但 Vulkan 支持处于实验性阶段。OpenGL 是最稳妥的选择。
? 条件
| 条件 |
触发时机 |
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&lWelcome",
"videoVolume": 0.8,
"nextAt": 8.0
},
{
"source": "https://www.youtube.com/watch?v=dQw4w9WgXcQ",
"transition": "fadeOut/In"
}
]
}
条件选项
| 选项 |
默认值 |
描述 |
videos |
[] |
按顺序播放的视频列表。 |
repeatableInSameSession |
首次加入时为 false,其余情况为 true |
false 表示每位玩家在每个世界中仅播放一次。 |
playlistLoop |
false |
播放列表结束后重新从头开始播放。 |
conditionDelay |
0.0 |
开始播放前等待的秒数。 |
replayOnReconnect |
false |
重新连接时,从开头重新播放被中断的视频。 |
disableLoadingScreen |
false |
第一个视频在后台准备就绪,并在加载出画面后显示。 |
protectPlayer |
true |
视频播放期间不造成任何伤害、饥饿、拾取或击退效果。 |
freezeWorld |
首次加入时为 true,其余情况为 false |
所有在线玩家观看期间,世界停止运行。 |
excludePlayers, excludeTeams |
[] |
永远不会触发此条件的玩家和队伍。 |
excludeOps |
false |
管理员永远不会看到此条件。 |
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+ |
Everywhere:
On the client:
On 26.2, 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
登录后参与评分
还没有评论,来抢沙发吧