⚔ GameMod
— Fabric 1.21.x
一款功能齐全的迷你游戏管理器,具备倒计时显示、设置 GUI、自定义出生点半径以及世界边界控制功能。
必需依赖项(需与本模组一同安装)
| 模组 |
下载链接 |
| Fabric API |
|
| Cloth Config |
|
| ModMenu |
|
命令(需要 op 等级 2)
游戏控制
| 命令 |
效果 |
/game start |
开始倒计时(如果已设置),然后启动游戏 |
/game stop |
取消倒计时或结束进行中的游戏 |
/game cooldown <time> |
设置倒计时时长(例如 10s、5m、2h) |
/game cooldown |
显示当前冷却设置 |
设置
| 命令 |
效果 |
/game settings 或 /game settings list |
打印所有当前设置 |
/game settings display actionbar |
在动作栏中显示倒计时 |
/game settings display bossbar |
在Boss 条中显示倒计时 |
/game settings spawn here |
将出生点设置为当前位置 |
/game settings spawn <x> <y> <z> |
将出生点设置为精确坐标 |
/game settings radius <blocks> |
在距离出生点 N 个方块范围内随机散布玩家(0 = 精确位置) |
/game settings border <size> |
为游戏设置世界边界直径 |
/game settings cooldown <time> |
与 /game cooldown <time> 相同 |
/game settings reset |
将所有内容重置为默认值 |
设置 GUI(ModMenu)
在游戏中打开 模组 屏幕 → 找到 Game Mod → 点击 ⚙ 按钮。
分类:
- 显示 — Boss 进度条与操作栏切换
- 出生点位置 — X / Y / Z 坐标 + 散布半径
- 世界边界 — 游戏尺寸与游戏结束后的重置尺寸
- 冷却时间 — 以
s / m / h 格式表示的持续时间
设置会自动保存至 config/gamemod.json。
工作原理
/game start 流程
- 检查是否存在活跃的倒计时或进行中的游戏(若已有运行中的游戏则阻止执行)
- 如果冷却时间 > 0:开始倒计时,并在所有玩家的屏幕上显示进度
- 归零时(或立即):将所有在线玩家传送至出生点半径内的随机位置,将世界边界中心设置在出生点坐标处,并将所有玩家设置为生存模式
随机半径传送
- 如果
radius = 0:所有玩家落在确切的出生点位置
- 如果
radius > 0:每个玩家在半径内获得一个随机的角度和距离;Y 轴高度通过地形高度图自动计算(玩家始终落在实心地面上,不会悬空或落入地下)
淘汰玩家
当玩家在游戏进行中死亡时,会自动切换到旁观者模式。执行 /game stop 会将所有旁观者玩家恢复为生存模式。
倒计时显示
| 剩余时间 |
操作栏颜色 |
Boss 进度条颜色 |
| > 10秒 |
? 绿色 |
绿色 |
| 6 – 10秒 |
? 黄色 |
黄色 |
| ≤ 5秒 |
? 红色 |
红色 |
配置文件
config/gamemod.json — 可通过图形界面或命令编辑,在服务器下次启动时重新加载。
{
"useBossBar": false,
"spawnX": 0.0,
"spawnY": 64.0,
"spawnZ": 0.0,
"spawnRadius": 25,
"gameBorderSize": 200.0,
"defaultBorderSize": 60000000.0,
"cooldownSeconds": 30
}
⚔ GameMod
— Fabric 1.21.x
A full-featured mini-game manager with countdown display, settings GUI, custom spawn radius, and world border control.
Required Dependencies (install alongside this mod)
| Mod |
Download |
| Fabric API |
|
| Cloth Config |
|
| ModMenu |
|
Commands (requires op level 2)
Game Control
| Command |
Effect |
/game start |
Begin countdown (if set) then launch the game |
/game stop |
Cancel countdown or end an active game |
/game cooldown <time> |
Set countdown duration (e.g. 10s, 5m, 2h) |
/game cooldown |
Show current cooldown setting |
Settings
| Command |
Effect |
/game settings or /game settings list |
Print all current settings |
/game settings display actionbar |
Show countdown in the action bar |
/game settings display bossbar |
Show countdown in a boss bar |
/game settings spawn here |
Set spawn to your current position |
/game settings spawn <x> <y> <z> |
Set spawn to exact coordinates |
/game settings radius <blocks> |
Scatter players within N blocks of spawn (0 = exact) |
/game settings border <size> |
Set world border diameter for the game |
/game settings cooldown <time> |
Same as /game cooldown <time> |
/game settings reset |
Reset everything to defaults |
Settings GUI (ModMenu)
Open the Mods screen in-game → find Game Mod → click the ⚙ button.
Categories:
- Display — boss bar vs action bar toggle
- Spawn Location — X / Y / Z coordinates + scatter radius
- World Border — game size and post-game reset size
- Cooldown — duration in
s / m / h format
Settings are saved to config/gamemod.json automatically.
How it Works
/game start flow
- Checks for an active countdown or game (blocks if already running)
- If cooldown > 0: counts down, displaying progress on all players' screens
- At zero (or instantly): teleports all online players to a random position within the spawn radius, sets world border centred on the spawn coordinates, sets everyone to Survival
Random radius teleport
- If
radius = 0: all players land on the exact spawn point
- If
radius > 0: each player gets a random angle and distance within the radius; Y is found automatically using the terrain heightmap (players always land on solid ground, not in mid-air or underground)
Eliminated players
When a player dies while a game is active they are automatically switched to Spectator mode. /game stop returns all spectators to Survival.
Countdown display
| Remaining |
Action bar colour |
Boss bar colour |
| > 10s |
? Green |
Green |
| 6 – 10s |
? Yellow |
Yellow |
| ≤ 5s |
? Red |
Red |
Config file
config/gamemod.json — edited by the GUI or commands, reloaded on next server start.
{
"useBossBar": false,
"spawnX": 0.0,
"spawnY": 64.0,
"spawnZ": 0.0,
"spawnRadius": 25,
"gameBorderSize": 200.0,
"defaultBorderSize": 60000000.0,
"cooldownSeconds": 30
}
评论 0
登录后参与评分
还没有评论,来抢沙发吧