# Build CUBIX BedWars — Complete Minecraft Plugin
Create a complete, fully functional Minecraft BedWars plugin named **CUBIX BedWars**.
## Compatibility
- Minecraft: Paper 26.3
- Java: 25
- Use the latest compatible Paper API.
- Build with Gradle.
- The final result MUST be a working, downloadable `.jar` file.
- Do not leave placeholder commands, unfinished features, TODOs, or fake functionality.
## Game Modes
- Solo
- Doubles
- 3v3v3v3
- 4v4v4v4
- Separate win leaderboards for each mode.
## Matchmaking
- Automatic matchmaking.
- 5-second countdown.
- Countdown resets if the lobby drops below the minimum player count.
- Map voting with previews and live vote counts.
- Players can change their votes.
- Start the match on the most-voted map.
- End the match immediately when only one team remains.
- Give the winning team a 10-second celebration before returning everyone to the lobby.
## Gameplay
- Give players full dyed leather armor and a wooden sword.
- Each team has its own island, bed, and spawn.
- Breaking a bed announces it in chat and displays a large title to the affected team.
- No kill announcements or final-kill titles.
- Players without a bed cannot respawn.
- Eliminated players become spectators.
## Death and Inventory
- Drop no items on the ground.
- Lose all iron, gold, diamonds, emeralds, potions, fireballs, TNT, golden apples, speed potions, and milk on death.
- Lose half of carried blocks on death.
- Purchased swords, armor upgrades, pickaxe upgrades, and axe upgrades remain after death.
- Shears do not remain after death.
- Maximum 1 golden apple, 1 speed potion, 1 milk bucket, 3 fireballs, and 3 TNT.
## Generators
- Iron, gold, diamond, and emerald generators.
- Generators operate even when nobody is nearby.
- Iron and gold generators cannot be upgraded.
- Diamond and emerald generators have fixed spawn rates.
- No automatic speed increases or admin-editable generator rates.
## Item Shop
Two NPCs on every team island:
1. Item Shop
2. Team Upgrades
Item Shop sells:
- Wool
- End Stone
- Obsidian
- Ladders
- Oak Planks
- Stone, Iron, and Diamond swords
- Pickaxes
- Axes
- Shears
- Fireballs
- TNT
- Golden Apples
- Speed Potions
- Milk
Do not sell ender pearls, water buckets, bridge eggs, invisibility potions, jump boost potions, knockback sticks, or blast-proof glass.
## Team Upgrades
Team upgrades apply to the entire team:
- Reinforced Armor: Protection I and II.
- Sharpened Swords: Sharpness I and II.
- Haste I and II.
- Mining Fatigue Trap.
- Counter-Offensive Trap.
Only one active trap per team. Traps activate when an enemy enters the island and disappear after activation. Reset upgrades every match.
## Coins and Cosmetics
- Coins are awarded only for winning matches.
- No coins for kills or bed breaks.
- Cosmetics are permanently unlocked using in-game coins.
- Cosmetics include kill effects, victory dances, and projectile trails.
- Add a lobby cosmetics menu.
## Stats and Leaderboards
Commands:
- /bw stats
- /bw stats
- /bw admin
Track:
- Wins
- Losses
- Kills
- Final kills
- Beds broken
- Coins
Separate win leaderboards for each game mode and a coins leaderboard. No BedWars XP or levels.
## Admin System
Create a complete `/bw admin` menu.
Admins can:
- Force-start and force-stop matches.
- Set lobby, spectator, and team spawns.
- Kick or ban players from active matches.
- Create, delete, rename, enable, and disable maps.
- Teleport to maps.
- Spectate active matches.
- Edit map boundaries.
- Set and change generators.
- Edit team spawns without recreating maps.
- Copy existing map setups.
- Set maximum player limits.
- Test maps before enabling them.
Admins cannot force-respawn players, change teams during active matches, change beds, or edit generator speeds/resource amounts.
## Custom Map Builder
Implement `/bw map create`.
When used:
- Create a new void world.
- Teleport the admin into it.
- Give the admin a special building inventory.
- Include structure tools for team islands, beds, team spawns, generators, Item Shop NPCs, and Team Upgrades NPCs.
- Placing a special structure tool should spawn its corresponding premade structure.
- Allow admins to position and configure structures.
- Support different team sizes and configurable team colors.
- Automatically reset maps after matches.
- Use separate waiting-lobby and match worlds.
## Bot Testing
Implement `/bw test `.
This should:
- Start a test match on the selected map.
- Fill all available player slots with bots.
- Make bots collect resources, purchase items, bridge, attack enemies, defend beds, and play like real players.
- Never award real player coins, wins, or stats during tests.
## Automatic Map Reset
After every match:
- Restore the original map.
- Restore beds, generators, and structures.
- Remove placed blocks and temporary entities.
- Reset team upgrades and match data.
## Technical Requirements
- Save player stats and coins permanently.
- Save map configurations and structure locations.
- Use clean, organized Java packages.
- Use configurable messages, sounds, and settings.
- Prevent exploits, duplicate purchases, inventory bugs, and match-state bugs.
- Make the plugin compatible with other common Paper plugins.
- Include permissions for all admin commands.
- Include a README with installation instructions and every command.
## IMPORTANT
Build the plugin in stages if necessary, but finish and test every system. Do not claim a feature works unless it actually does.
At the end, compile the complete project and provide the actual downloadable `CUBIXBedWars.jar` file. Do not just give me Java source code or a project folder.