TrajCakeWars
专为 Spigot、Paper、Purpur 及所有基于 Spigot 的分支打造的完全独立 Cake Wars 1v1 小游戏引擎。
两名玩家通过食用对方的蛋糕来战斗;只需咬七口即可摧毁蛋糕,每次啃食间隔一秒。只要你的蛋糕还在,你就可以无限复活。一旦蛋糕被毁,你下一次的死亡将是终局。
每场对局都在其独立的临时世界中运行,该世界从模板克隆而来,并在游戏结束后自动删除。不留任何残留文件,无需手动清理。
为什么选择 TrajCakeWars?
- 零依赖 -> 放入 JAR 包即可运行。无需库、API,也无需复杂的设置。
- 适用于任何服务器 -> 无论是生存服(SMP)、小游戏网络还是专用服务器均可使用。物品栏保存/恢复功能确保你的生存玩家能保留原有物品。
- 全兼容 -> Citizens、ZNPCs、FancyNpcs、Vault、LuckPerms、TAB,或者只是一个重命名的村民,插件都能完美适配。
- 完全可配置 -> 每个商店物品、每种价格、每项奖励、每条消息均可自定义。一个
config.yml 即可控制全局。
- 生产就绪 -> 经过实战检验,拥有自定义死亡系统(无原版死亡画面)、游戏中的命令拦截、不可破坏的物品以及地图保护功能。
功能特性
游戏玩法
- 1v1 Cake Wars,采用“啃食摧毁”机制(右键点击,7个切片,1秒冷却)
- 基于配置的物品与方块商店,支持自动装备剑甲及护甲分级
- 铁锭和钻石资源生成器,支持配置生成间隔和地面上限
- TNT 和爆炸仅破坏玩家放置的方块 -> 原始地图地形受到保护
- 所有游戏内物品均不可破坏 -> 战斗中不会出现耐久度损耗
- 赛前冻结倒计时,并显示标题提示
- 自定义死亡系统 -> 旁观者模式复活,永不显示原版死亡画面
匹配系统
- 三种队列类型:快速匹配(随机地图)、指定地图匹配和私人房间
- 支持 6 位邀请码的私人房间
- 跨队列匹配以加快组局速度
- 简洁的 GUI 菜单用于所有玩家操作
服务器集成
- 完整的物品栏保存与恢复 —— 包括护甲、副手、经验值、生命值、饥饿度和游戏模式
- 游戏中拦截命令,支持配置白名单
- 精确的返回大厅位置(再也不用担心掉入虚空)
- 每局世界克隆及自动清理
管理工具
- 游戏内 GUI 管理面板
/cw tp <arena> 传送至模板进行设置
- 完整的命令套件,支持 Tab 补全
- 竞技场创建、删除(带确认提示)及配置
- 模板管理,使用
/cw savetemplate
快速开始
1. 安装
将 TrajCakeWars.jar 放入 plugins/ 目录并启动服务器。
2. 准备地图
建造一张包含两个岛屿、蛋糕和桥梁的 CakeWars 地图。在每个岛屿上放置名为 "Items Shop" 和 "Blocks Shop" 的村民。将世界文件夹复制到服务器根目录下的 cw_templates/ 中,或在游戏内使用 /cw savetemplate <name> 命令。
3. 配置竞技场
/cw create myarena
/cw tp myarena
/cw set myarena spawn1 — 玩家 1 出生点
/cw set myarena spawn2 — 玩家 2 出生点
/cw set myarena cake1 — 玩家 1 的蛋糕方块
/cw set myarena cake2 — 玩家 2 的蛋糕方块
/cw set myarena gen1 — 1号岛铁生成器
/cw set myarena gen2 — 2号岛铁生成器
/cw set myarena diamond — 钻石生成器(每个岛屿重复一次)
/cw set myarena lobby — 旁观者/等待区域
/cw settemplate myarena myarena
/cw back
/cw setlobby — 站在玩家游戏结束后返回的位置
/cw enable myarena
/cw save
4. 游玩
玩家使用 /cw 打开菜单,或点击大厅 NPC。队列中有两名玩家 -> 开始匹配 -> 克隆临时世界 -> 进行游戏 -> 获胜者获得奖励 -> 双方返回大厅 -> 世界被删除。
命令
| 命令 |
描述 |
/cw |
打开主菜单 |
/cw join |
加入匹配队列 |
/cw join <code> |
加入私人房间 |
/cw private <arena> |
创建私人房间 |
/cw leave |
离开队列或退出游戏 |
/cw tp <arena> |
传送至模板(管理员) |
/cw back |
返回大厅(管理员) |
/cw setlobby |
设置大厅返回点(管理员) |
/cw create/delete <id> |
创建或删除竞技场(管理员) |
/cw set <arena> <point> |
设置竞技场配置点(管理员) |
/cw enable <arena> |
启用竞技场(管理员) |
/cw save |
保存配置(管理员) |
/cw admin |
打开管理员 GUI(管理员) |
权限
| 权限节点 |
默认值 |
描述 |
cakewars.play |
true |
使用 /cw,加入队列,进行游戏 |
cakewars.admin |
op |
竞技场管理,管理员 GUI,绕过命令拦截 |
兼容性
服务端: Spigot、Paper、Purpur、Pufferfish 及所有基于 Spigot 的分支(1.21+)
不兼容: Folia、Fabric、Forge、Sponge
NPC 插件: Citizens、ZNPCs、FancyNpcs、ZNPCsPlus,或原版村民
经济系统: Vault、EssentialsX(用于奖励命令)
其他: LuckPerms、TAB 以及任何不与世界管理冲突的插件
配置
所有内容均位于单个 config.yml 中:
- 商店物品(材质、价格、货币、数量、lore、类型)
- 生成器间隔和地面上限
- 胜利/失败奖励及控制台命令(
%winner%、%loser%、%arena%)
- NPC 检测关键词
- 游戏期间的命令白名单
- 物品栏保存开关
- 游戏参数(倒计时、复活时间、最大时长)
完整文档:
支持
发现 Bug?有功能建议?请在 GitHub 仓库提交 Issue,或通过 Discord 联系:hash_014
由 TrajStudio 构建 —— ~2400 行代码,17 个源文件,零依赖。
© 2026 TrajStudio. All rights reserved.
TrajCakeWars
A fully standalone Cake Wars 1v1 minigame engine for Spigot, Paper, Purpur, and all Spigot-based forks.
Two players fight to eat the opponent's cake; seven bites to destroy it, one second cooldown between each. As long as your cake stands, you respawn. Once it's gone, your next death is final.
Every match runs in its own isolated temporary world, cloned from a template and automatically deleted after the game. No leftover files, no manual cleanup.
Why TrajCakeWars?
- Zero dependencies -> drop the JAR and go. No libraries, no APIs, no setup headaches.
- Works on any server -> SMP, minigame network, or dedicated. Inventory save/restore means your survival players keep their stuff.
- Compatible with everything -> Citizens, ZNPCs, FancyNpcs, Vault, LuckPerms, TAB, or just a renamed villager. The plugin doesn't care.
- Fully configurable -> every shop item, every price, every reward, every message. One config.yml controls it all.
- Production-ready -> battle-tested with custom death system (no vanilla death screen), command blocking during games, unbreakable items, and map protection.
Features
Gameplay
- 1v1 Cake Wars with eat-to-destroy cake mechanic (right-click, 7 slices, 1s cooldown)
- Config-driven Items & Blocks shops with auto-equip swords and armor tiering
- Iron and Diamond resource generators with configurable intervals and ground caps
- TNT and explosions only destroy player-placed blocks -> original map terrain is protected
- All game items are unbreakable -> no durability loss mid-fight
- Pre-game freeze countdown with title display
- Custom death system -> spectator mode respawn, no vanilla death screen ever
Matchmaking
- Three queue types: quick play (random map), map-specific, and private sessions
- Private sessions with 6-character invite codes
- Cross-queue matching for faster games
- Clean GUI menu for all player actions
Server Integration
- Full inventory save and restore — armor, offhand, XP, health, food, gamemode
- Command blocking during games with configurable whitelist
- Precise lobby return point (no more void falls)
- Per-game world cloning and automatic cleanup
Admin Tools
- In-game GUI admin panel
/cw tp <arena> to teleport into templates for setup
- Full command suite with tab-completion
- Arena creation, deletion (with confirmation), and configuration
- Template management with
/cw savetemplate
Quick Start
1. Install
Drop TrajCakeWars.jar into plugins/ and start the server.
2. Prepare your map
Build a CakeWars map with two islands, cakes, and bridges. Place villagers named "Items Shop" and "Blocks Shop" on each island. Copy the world folder to cw_templates/ at the server root, or use /cw savetemplate <name> in-game.
3. Configure the arena
/cw create myarena
/cw tp myarena
/cw set myarena spawn1 — player 1 spawn
/cw set myarena spawn2 — player 2 spawn
/cw set myarena cake1 — player 1 cake block
/cw set myarena cake2 — player 2 cake block
/cw set myarena gen1 — iron generator island 1
/cw set myarena gen2 — iron generator island 2
/cw set myarena diamond — diamond generator (repeat for each)
/cw set myarena lobby — spectator/waiting point
/cw settemplate myarena myarena
/cw back
/cw setlobby — stand where players return after games
/cw enable myarena
/cw save
4. Play
Players use /cw to open the menu, or click a lobby NPC. Two players in the queue → match starts → temporary world cloned → game plays → winner gets rewards → both return to lobby → world deleted.
Commands
| Command |
Description |
/cw |
Open main menu |
/cw join |
Join matchmaking queue |
/cw join <code> |
Join private session |
/cw private <arena> |
Create private session |
/cw leave |
Leave queue or game |
/cw tp <arena> |
Teleport into template (admin) |
/cw back |
Return to lobby (admin) |
/cw setlobby |
Set lobby return point (admin) |
/cw create/delete <id> |
Create or delete arena (admin) |
/cw set <arena> <point> |
Set arena config point (admin) |
/cw enable <arena> |
Enable arena (admin) |
/cw save |
Save config (admin) |
/cw admin |
Open admin GUI (admin) |
Permissions
| Permission |
Default |
Description |
cakewars.play |
true |
Use /cw, join queues, play games |
cakewars.admin |
op |
Arena management, admin GUI, bypass command blocking |
Compatibility
Server: Spigot, Paper, Purpur, Pufferfish, and all Spigot-based forks (1.21+)
Not compatible: Folia, Fabric, Forge, Sponge
NPC plugins: Citizens, ZNPCs, FancyNpcs, ZNPCsPlus, or vanilla villagers
Economy: Vault, EssentialsX (for reward commands)
Other: LuckPerms, TAB, and any plugin that doesn't conflict with world management
Configuration
Everything is in one config.yml:
- Shop items (material, price, currency, amount, lore, type)
- Generator intervals and ground caps
- Victory/defeat rewards with console commands (
%winner%, %loser%, %arena%)
- NPC detection keywords
- Command whitelist during games
- Inventory save toggle
- Game parameters (countdown, respawn time, max duration)
Full documentation:
Support
Found a bug? Have a feature request? Open an issue on the GitHub repository or reach out on Discord : hash_014
Built by TrajStudio — ~2400 lines of code, 17 source files, zero dependencies.
© 2026 TrajStudio. All rights reserved.
评论 0
登录后参与评分
还没有评论,来抢沙发吧