TwitchRandomizer
TwitchRandomizer 是一款功能强大的 Minecraft(Paper 1.21+)插件,为服务器带来互动的随机挑战——全部由你的 Twitch 观众控制!它将你的 Minecraft 游戏体验与 Twitch 聊天无缝集成,让观众能够实时影响并触发游戏内事件。
? 主要特性
-
Twitch 聊天集成:
Twitch 观众可以通过订阅或捐赠 Bits 来触发随机事件!
-
与你的 Twitch 好友一起挑战:
该插件可以读取多个 Twitch 账户的订阅和 Bits 数据——包括 StreamElements 和 Tipeeestream 的捐赠。因此,你可以与你的 Twitch 好友一起玩这个挑战!
-
StreamElements & Tipeeestream 捐赠集成:
通过 StreamElements 或 Tipeeestream 进行的捐赠会触发游戏内事件。两者均支持同时连接多个主播账户。配置完全通过在插件文件夹中的 donations.yml 文件进行。
-
频道名称显示:
当与多个 Twitch 频道一起玩时,每个触发事件的来源频道会以方括号形式显示在名称之后——例如:exnfachjan (fuxelbau) 造成 4 颗心的伤害。
-
Twitch 角色颜色:
观众名称在 Minecraft 聊天中以不同颜色区分——主播(红色)、版主(绿色)、VIP(粉色)、捐赠者(水蓝色),普通观众(白色)。
-
事件权重与自定义:
调整每个事件出现的概率——让某些事件更常见、某些更稀有,或直接禁用它们。随时轻松重新加载或调整设置。一键重置所有权重为默认值。
-
最近事件冷却:
内置的冷却系统自动降低同一事件连续出现多次的概率——无需任何配置。
-
同步多人事件:
当多名玩家一起游戏时,每个事件内的所有随机值(持续时间、物品、生物类型等)对所有玩家均保持一致。不再出现玩家 1 遭遇“地板是岩浆”持续 10 秒,而玩家 2 却只有 69 秒的情况。
-
死后旁观模式:
当一名玩家死亡时,所有玩家会同时进入旁观模式。计时器和队列暂停,直到新一轮开始。可针对每轮配置为“尝试次数”(团队生命数)或经典的“死亡次数”计数器。
-
死亡计数与统计:
内置死亡追踪和玩家统计数据,非常适合挑战玩法和社区竞赛。
-
队列系统:
由观众触发的事件可以排队并管理,确保节奏流畅且避免事件刷屏。队列在服务器重启和世界重置后依然保留!
-
暂停系统:
当玩家处于死亡画面或所有玩家都处于旁观模式时,计时器和队列会自动暂停。完全可配置。
-
暂停光环:
当计时器暂停时,所有在线玩家周围会出现螺旋火焰粒子光环——这是挑战暂停的清晰视觉提示。
-
图形界面 (GUI):
通过游戏内图形界面直接调整插件设置、管理事件权重、控制计时器以及配置行为。无需任何 OP 权限即可轻松设置!
-
多语言支持:
完整的德语和英语用户界面,支持自动检测客户端语言。玩家可在 GUI 中手动覆盖自己的语言选择。
-
会话与世界重置:
如果希望获得真正的挑战,可以在每次死亡后重置种子!支持 BungeeCord 备用服务器回退机制。
✔️ 主要命令
可选命令(非必需,因为你可以无缝地从图形界面管理所有内容):
/timer — 开始、停止、暂停或重置挑战计时器。
/reset — 在确认后启动世界/会话重置。
/queue add <数量> <用户名> — 手动向队列中添加事件。
/cleardeath — 清除死亡计数器。
/trconfig — 通过命令配置插件(支持 Tab 补全)。
? 事件
| 事件 |
描述 |
| spawn_mobs |
在玩家附近生成随机生物(敌对生物会追击你!) |
| potion |
施加随机药水效果 |
| give_item |
给予随机物品 |
| clear_inventory |
清空玩家背包中的随机槽位 |
| teleport |
传送至随机位置(安全的 Y 轴高度) |
| damage_half_heart |
受到半颗心的伤害 |
| fire |
点燃玩家 |
| inv_shuffle |
打乱整个背包 |
| hot_potato |
一只快速僵尸追击你——如果它追上你,就会爆炸! |
| no_crafting |
阻止合成一段时间(带有 Boss 栏倒计时) |
| safe_creepers |
苦力怕以时钟样式围绕你并爆炸(不造成伤害,不破坏方块) |
| floor_is_lava |
脚下的地面变为岩浆块(带有方块还原功能) |
| nasa_call |
将玩家发射到高空 |
| slippery_ground |
地面变为压制的冰(带有方块还原功能) |
| hell_is_calling |
追踪火球如雨般向你落下 |
| tnt_rain |
TNT 矿车从天而降 |
| anvil_rain |
铁砧从天而降 |
| skyblock |
所有玩家被传送到一起——周围的区块将被删除! |
| fake_totem |
获得一个实际上无效的不死图腾 |
| equipment_shuffle |
背包中所有带等级的工具和护甲会被随机升级或降级 |
? 开始使用
你可以通过 config.yml 配置文件或在游戏内通过 GUI(无需 OP 权限)来配置该插件。
-
安装:
将 TwitchRandomizer.jar 放入服务器的 plugins 文件夹中。
-
配置 Twitch 集成:
- 使用
/trgui 打开 GUI;在左上角,你会找到一本名为 "twitch-info" 的书。
- 左击该书输入你的
Broadcaster Username(主播用户名),然后点击 done 确认。
你可以输入多个频道,用逗号、分号或换行符分隔。
- 右击该书输入你的
Bot OAuth(机器人 OAuth 令牌),然后点击 done 确认。
你可以在这里获取 OAuth 令牌:
确保以下权限范围已激活:bits.read、chat:read、channel:read:subscriptions 和 user:read:subscriptions。
-
配置 StreamElements(可选):
编辑 plugins/TwitchRandomizer/donations.yml —— 该文件会在首次启动时自动创建,且插件永远不会覆盖此文件。
se_enabled: true
se_accounts: "YOUR_CHANNEL:YOUR_JWT_TOKEN"
对于多个主播,条目之间用分号分隔:
se_accounts: "Channel1:JWT1;Channel2:JWT2"
从以下地址获取你的 JWT 令牌:
-
配置 Tipeeestream(可选):
在同一个 donations.yml 文件中:
tipeee_enabled: true
tipeee_accounts: "YOUR_CHANNEL:YOUR_APIKEY"
多账户的用法相同:"Ch1:KEY1;Ch2:KEY2"
从以下地址获取你的 API 密钥:
编辑完 donations.yml 后,在游戏内执行 /trconfig donations reload 应用更改 —— 无需重启服务器。
-
重载/重启:
如果你使用的是 GUI 进行配置,则不需要重启服务器。
-
设置触发器
你可以测试连接是否正常。启用测试触发器(在 Debug Menu 调试菜单中找到),你可以模拟事件,例如关注(!test)、赠送关注(!gift)或关注炸弹(!giftbomb [N])。
请确保你的计时器正在运行!否则,你无法通过 Twitch 向队列中添加事件!
如果你想向队列中添加一些事件,只需使用命令 /queue add <AMOUNT> <Username> 即可。即使计时器未运行,此命令也有效!
? 非 OP 用户的权限说明(需要 LuckPerms)
| 权限 |
描述 |
| twitchrandomizer.gui |
完整 GUI 访问权限(超级节点) |
| twitchrandomizer.gui.use |
使用 GUI(基础权限) |
| twitchrandomizer.admin.save |
保存并热重载配置 |
| twitchrandomizer.admin.edit |
通过 GUI 编辑数值 |
| twitchrandomizer.admin.twitch |
设置 Twitch 频道/token |
| twitchrandomizer.timer.start |
启动计时器 |
| twitchrandomizer.timer.stop |
停止/暂停计时器 |
| twitchrandomizer.timer.reset |
重置计时器 |
| twitchrandomizer.reset |
重置流程 |
| twitchrandomizer.reset.force |
强制重置(跳过确认) |
GUI 会对每个操作执行合理的权限检查。
? 要求
-
Minecraft Paper 服务器 1.21+
-
Java 21 或更高版本
-
Twitch 账号(至少为合作伙伴 Affiliate)以及用于聊天集成的 OAuth 令牌
-
Tipeeestream 多账户支持 — donations.yml 现在使用 tipeee_accounts,格式与 StreamElements 相同,为 "Channel:APIKEY;Channel2:APIKEY2"。
-
频道标签显示 — 当连接多个 Twitch 频道时,每个事件触发后会在括号内显示来源频道名称。
-
同步多人事件 — 同一事件分发中的所有随机值(持续时间、物品、生物类型、药水效果等)对所有玩家均保持一致。
-
Skyblock 队伍修复 — 在清除区块前,所有玩家将被传送至同一个集合点,防止玩家互相掉入虚空。
-
死后旁观模式下的队伍修复 — 当一名玩家死亡时,所有在线玩家将同时进入旁观者模式。计时器和队列暂停功能恢复正常。
-
尝试次数 vs 死亡次数计数器 — 启用“死后旁观模式”时,计数器标记为 “Tries/Versuche”,仅统计每支队伍的一次死亡;禁用时则按之前的逻辑统计个人死亡次数。
-
单次捐赠/事件金额上限 — 每次触发事件的捐赠金额上限设为 5.0€(标准价格)。只能低于此值,不能更高。
-
近期事件冷却机制 — 新增防重复算法,降低最近触发过的事件在下一次或下两次抽取中的权重,使事件池体验更加多样化。
-
全员旁观时暂停队列 — 当所有玩家进入旁观者模式时,计时器和队列会立即正确暂停。
v1.4.0
- 新事件:
equipment_shuffle — 背包中所有带等级系统的工具和护甲会随机升阶或降阶一级。附魔、自定义名称和描述信息将被保留。
- StreamElements 捐赠集成 — 通过 StreamElements 进行的捐赠现在可触发游戏内事件。支持同时绑定多个主播账户。
- 暂停光环特效 — 计时器暂停期间,所有在线玩家周围会显示螺旋火焰粒子效果。
- 权重调整: 默认数值略有变动。
v1.3.1
? 致谢
由 exnfachjan 开发,并借助 AI(Anthropic 的 Claude)协助完成。
感谢 Paper/Spigot 社区以及 Twitch4J 提供的坚实基础。
? 许可证
本项目遵循 GNU General Public License v3.0 许可证 ——
详见 LICENSE。
❤️ 支持
喜欢我的插件吗?欢迎支持我的工作:
TwitchRandomizer
TwitchRandomizer is a powerful Minecraft (Paper 1.21+) plugin that brings interactive, randomized challenges to your server — all controlled by your Twitch viewers! It seamlessly integrates your Minecraft gameplay with Twitch chat, letting your audience influence and trigger in-game events in real time.
? Key Features
-
Twitch Chat Integration:
Twitch viewers can trigger random events by subscribing or donating bits to your channel!
-
Play this Challenge with your Twitch Friends:
The plugin can read subscriptions and bits from multiple Twitch accounts — including StreamElements and Tipeeestream donations. So you can play this challenge with your Twitch friends!
-
StreamElements & Tipeeestream Donation Integration:
Donations via StreamElements or Tipeeestream trigger in-game events. Both support multiple streamer accounts simultaneously. Configuration is done exclusively via donations.yml in the plugin folder.
-
Channel Name Display:
When playing with multiple Twitch channels, the source channel is shown in brackets after every trigger — e.g. exnfachjan (fuxelbau) deals 4 hearts.
-
Twitch Role Colors:
Viewer names appear color-coded in Minecraft chat — Broadcaster (red), Moderator (green), VIP (pink), Donation (aqua), and regular viewers (white).
-
Event Weighting and Customization:
Adjust the likelihood of each event — make some more common, some rare, or disable them entirely. Easily reload or adjust settings on the fly. Reset all weights to defaults with one click.
-
Recent Event Cooldown:
A built-in cooldown system reduces the chance of the same event appearing multiple times in a row, automatically — no configuration needed.
-
Synced Multi-Player Events:
When playing with multiple players, all random values within an event (duration, item, mob type, etc.) are identical for every player. No more player 1 getting 10 seconds of Floor is Lava while player 2 gets 69.
-
Spectator After Death:
When a player dies, all players are moved to Spectator mode simultaneously. The timer and queue pause until a new run begins. Configurable per-run as "Tries" (team lives) or classic "Deaths" counter.
-
Death Counter and Statistics:
Built-in death tracking and player statistics, perfect for challenge runs and community competitions.
-
Queue System:
Viewer-triggered events can be queued and managed, ensuring smooth pacing and no event spam. The queue persists across server restarts and world resets!
-
Pause System:
Timer and queue automatically pause when a player is in the death screen or when all players are in spectator mode. Fully configurable.
-
Pause Aura:
When the timer is paused, a spiral flame particle aura appears around all online players — a clear visual indicator that the challenge is on hold.
-
Graphical Interface (GUI):
Tweak plugin settings, manage event weights, control the timer, and configure behaviors directly from an in-game GUI. Perfect for easy setup without any OP permissions!
-
Multi-Language Support:
Full German and English UI with automatic client language detection. Players can override their language in the GUI.
-
Session and World Reset:
Reset your seed after a death if you want a REAL challenge! Supports BungeeCord fallback servers.
✔️ Main Commands
/trgui — Open the graphical config GUI.
Optional commands (not necessary, because you can manage everything seamlessly from the GUI):
/timer — Start, stop, pause, or reset the challenge timer.
/reset — Initiate a world/session reset with confirmation.
/queue add <amount> <username> — Manually add events to the queue.
/cleardeath — Clear the death counter.
/trconfig — Configure the plugin via command (tab completion supported).
? Events
| Event |
Description |
| spawn_mobs |
Spawn random mobs near the player (hostile mobs chase you!) |
| potion |
Apply a random potion effect |
| give_item |
Give a random item |
| clear_inventory |
Clear random slots from the player's inventory |
| teleport |
Teleport to a random location (safe Y-level) |
| damage_half_heart |
Take heart damage |
| fire |
Set the player on fire |
| inv_shuffle |
Shuffle the entire inventory |
| hot_potato |
A fast zombie chases you — if it catches you, it explodes! |
| no_crafting |
Block crafting for a random duration (with boss bar countdown) |
| safe_creepers |
Creepers surround you clock-style and explode (no damage, no block destruction) |
| floor_is_lava |
The floor beneath you turns to magma blocks (with block restore) |
| nasa_call |
Launch the player sky-high |
| slippery_ground |
The ground turns to packed ice (with block restore) |
| hell_is_calling |
Homing fireballs rain down on you |
| tnt_rain |
TNT Minecarts rain from the sky |
| anvil_rain |
Anvils fall from the sky |
| skyblock |
All players are teleported together — surrounding chunks get deleted! |
| fake_totem |
Receive a Totem of Undying that doesn't actually work |
| equipment_shuffle |
All tiered tools and armor in your inventory are randomly upgraded or downgraded |
? Getting Started
You can configure the plugin through the config.yml or without OP permissions directly through the GUI in-game.
-
Install:
Place TwitchRandomizer.jar into your server's plugins folder.
-
Configure Twitch Integration:
- Open the GUI with
/trgui; in the top left, you'll find the "twitch-info" book.
- Insert your
Broadcaster Username by left-clicking on the book, then confirm with done.
You can enter multiple channels separated by commas, semicolons, or new lines.
- Insert your
Bot OAuth by right-clicking on the book, then confirm with done.
You can get your OAuth token here:
Make sure the following scopes are active: bits.read, chat:read, channel:read:subscriptions and user:read:subscriptions.
-
Configure StreamElements (optional):
Edit plugins/TwitchRandomizer/donations.yml — this file is created automatically on first start and is never overwritten by the plugin.
se_enabled: true
se_accounts: "YOUR_CHANNEL:YOUR_JWT_TOKEN"
For multiple streamers, separate entries with a semicolon:
se_accounts: "Channel1:JWT1;Channel2:JWT2"
Get your JWT token from:
-
Configure Tipeeestream (optional):
In the same donations.yml:
tipeee_enabled: true
tipeee_accounts: "YOUR_CHANNEL:YOUR_APIKEY"
Multiple accounts work the same way: "Ch1:KEY1;Ch2:KEY2"
Get your API key from:
After editing donations.yml, apply it in-game with /trconfig donations reload — no server restart required.
-
Reload/Restart:
If you use the GUI, you don't need to restart the server.
-
Set up your trigger
You can test your connection. With the test triggers enabled (find them in the Debug Menu), you can simulate events like a sub (!test), a gift sub (!gift), or a sub gift bomb (!giftbomb [N]).
MAKE SURE YOUR TIMER IS RUNNING! OTHERWISE, YOU CAN'T ADD EVENTS TO THE QUEUE THROUGH TWITCH!
If you want to add some events to the queue, you can simply use the command /queue add <AMOUNT> <Username>. This also works when the timer isn't running!
? Permissions for non-OP users (LuckPerms required)
| Permission |
Description |
| twitchrandomizer.gui |
Full GUI access (super-node) |
| twitchrandomizer.gui.use |
Use GUI (basic) |
| twitchrandomizer.admin.save |
Save & hot-reload config |
| twitchrandomizer.admin.edit |
Edit values via GUI |
| twitchrandomizer.admin.twitch |
Set Twitch channel/token |
| twitchrandomizer.timer.start |
Start the timer |
| twitchrandomizer.timer.stop |
Stop/pause the timer |
| twitchrandomizer.timer.reset |
Reset the timer |
| twitchrandomizer.reset |
Reset flow |
| twitchrandomizer.reset.force |
Force reset (skip confirmation) |
The GUI uses sensible permission checks for each action.
? Requirements
- Minecraft Paper server 1.21+
- Java 21 or newer
- Twitch account (at least affiliate) and OAuth token for chat integration
? Changelog
v1.5.0
- Tipeeestream multi-account support —
donations.yml now uses tipeee_accounts with the same "Channel:APIKEY;Channel2:APIKEY2" format as StreamElements.
- Channel tag display — When playing with multiple Twitch channels, the source channel name is shown in brackets after every event trigger.
- Synced multi-player events — All random values (duration, item, mob type, potion effect, etc.) are now identical for every player in the same event dispatch.
- Skyblock team fix — All players are now teleported to a single meeting point before chunks are cleared. Prevents players from voiding each other.
- Spectator-after-death team fix — When a player dies, all online players are now moved to Spectator simultaneously. Timer and queue pause correctly.
- Tries vs Deaths counter — When Spectator-after-death is enabled, the counter is labeled "Tries/Versuche" and only counts once per team-death. When disabled, it counts individual deaths as before.
- Euro/Event maximum — The donation value per event is now capped at 5.0€ (the standard price). You can only go lower, not higher.
- Recent event cooldown — A new anti-repeat algorithm reduces the weight of recently triggered events for the next 2–3 picks, making the event pool feel more varied.
- Queue pause on all-spectator — Timer and queue now correctly pause as soon as all players are in Spectator mode.
v1.4.0
- New event:
equipment_shuffle — All tiered tools and armor in the inventory are randomly upgraded or downgraded by one tier. Enchantments, display names, and lore are preserved.
- StreamElements donation integration — Donations via StreamElements now trigger in-game events. Supports multiple streamer accounts simultaneously.
- Pause aura — A spiral flame particle effect is displayed around all online players while the timer is paused.
- Weights: small default value changes.
v1.3.1
? Credits
Built by exnfachjan with the help of AI (Claude by Anthropic).
Thanks to the Paper/Spigot communities and Twitch4J for solid foundations.
? License
This project is licensed under the GNU General Public License v3.0 —
see LICENSE for details.
❤️ Support
Do you like my plugin? Feel free to support my work:
评论 0
登录后参与评分
还没有评论,来抢沙发吧