Create a fully automatic Minecraft Paper 1.21+ plugin named "UltimateTrialsEvent" with Java 21. This plugin is a multi-round event system with Waiting Room → Maze → Puzzle → Mini Battle → Final PvP, fully configurable and error-free.
Requirements:
- Waiting Room / Lobby:
- Players join → automatically teleported to lobby.
- PvP disabled.
- Anti-cheat enforced (no fly, speed, x-ray, teleport hacks).
- Barrier-covered boundaries.
- Players cannot break/place blocks.
- Live center-screen title showing: "WAITING FOR EVENT" and "Players in Lobby: %players%".
- BossBar countdown timer (default 60s, configurable).
- After countdown → automatically start Round 1 (Maze).
- Round 1 – Maze:
- PvP automatically disabled.
- Barrier-covered boundaries.
- Anti-cheat enforced.
- Players cannot break/place blocks.
- Timer countdown (default 10 minutes, configurable).
- Players automatically qualify if they reach maze exit.
- Eliminated players → auto spectator.
- Alive counter updates live.
- Automatically proceed to Puzzle round after timer ends.
- Round 2 – Puzzle:
- PvP disabled automatically.
- Barrier-covered boundaries.
- Anti-cheat enforced.
- Puzzle rooms instanced per player or separated.
- Timer countdown (default 8 minutes, configurable).
- Players automatically qualify if they solve puzzle.
- Eliminated players → auto spectator.
- Alive counter updates live.
- Automatically proceed to Mini Battle round after timer ends.
- Round 3 – Mini Battle:
- PvP enabled automatically.
- Barrier-covered arena.
- Shrinking border automatically.
- Kits given automatically (configurable).
- Last 5 alive automatically qualify.
- Eliminated players → auto spectator.
- Alive counter updates live.
- Automatically proceed to Final round.
- Final Round – PvP:
- PvP enabled automatically.
- Barrier-covered arena.
- Diamond/Configured kit given automatically.
- Shrinking border automatically.
- Last player alive → automatically announced as winner.
- Admin can configure reward commands for winner.
- Protection & Anti-Cheat:
- Barrier blocks auto-generated around arenas and lobby.
- Players cannot break/place blocks in Maze, Puzzle, or Lobby.
- Anti-cheat enforced in all rounds (no fly, speed, x-ray, teleport hacks).
- Spectators cannot interfere.
- PvP toggled automatically per round.
- Titles & Alive Counter:
- Live center-screen title, actionbar, and bossbar showing round name + alive players.
- Updates every 5 seconds.
- Supports color codes: &c (Red), &f (White), &#B87333 (Copper), Hex.
- PlaceholderAPI integration with these placeholders:
%utevent_round% %utevent_alive% %utevent_total% %utevent_state% %utevent_timeleft% %utevent_player_rank% %utevent_is_alive% %utevent_lobby_count%
- Safe "N/A" return if event inactive.
- Rank System:
- Owner / Developer / Admin / Staff.
- Permissions configured via config.yml.
- Commands limited by rank.
- Optional admin commands override (manual commands like /event status, /event setcolor, /event setrank, but main event fully automatic).
- Admin Commands:
- /event start, stop, nextround, eliminate <player>, add <player>, setroundtime <round> <seconds>, status, setcolor <name> <value>, setrank <player> <rank>, setlobby, setmaze, setmazeexit, setpuzzlearena, setbattlearena, setfinalarena, setspectator.
- Configuration:
- Configurable round times, lobby countdown, color codes, barrier options, mini-battle finalists.
- Example:
waiting-room: location: world,x,y,z pvp: false break-blocks: false place-blocks: false barriers: true anti-cheat: true countdown: 60 live-title-refresh-seconds: 5 round-times: maze: 600 puzzle: 480 battle: 300 final: 600 mini-battle-finalists: 5 colors: red: "&c" white: "&f" copper: "&#B87333"
- Error-Free & Safe:
- Null checks everywhere.
- Validate worlds & arenas before teleport.
- Cancel tasks on disable.
- Save event data on disable.
- No deprecated API usage.
- Use Adventure API / MiniMessage / Component.text() for titles and colors.
- Plugin Features Summary:
- Fully automatic multi-round event system.
- PvP automatically toggled per round.
- Waiting Room fully protected and automatic.
- Barrier-protected arenas & lobby.
- Anti-cheat enforced.
- Live center-screen titles + actionbar + bossbar + alive counter.
- Rank system + permissions.
- PlaceholderAPI support.
- Red / White / Copper / Hex colors.
- Fully configurable.
- 1.21+ Paper compatible.
- Error-free, production-ready.
No files in this session