Create a lightweight Minecraft Paper plugin for Paper 1.21.11 called "EndWarBar".
Purpose:
This plugin is ONLY for the Season 2 End War event on an SMP. Keep it simple, vanilla-style, and lightweight.
FEATURES:
- End War BossBar
- When an admin runs
/endwar start, show a BossBar to ALL online players. - BossBar text should be configurable.
- Default text:
"⚔ END WAR — SEASON 2"
- Default color: RED
- Default style: SOLID
- BossBar should stay visible until the event is stopped.
- Do NOT use a timer for the BossBar.
- When
/endwar stop is used, remove the BossBar from all players.
- Start Announcement
When /endwar start is executed, show ALL online players a large Title:
Title: "⚔ END WAR STARTED!" Subtitle: "Season 2 Finale"
Both title and subtitle must be configurable.
Also send a configurable chat message, for example: "⚔ End War has officially started! Good luck everyone!"
Play a configurable sound to all online players when the event starts.
- Stop Announcement
When /endwar stop is executed:
- Remove the BossBar.
- Show a configurable title:
"END WAR ENDED"
- Send a configurable chat message.
- Play a configurable sound.
- Commands
/endwar start /endwar stop /endwar reload /endwar status
Permissions: endwar.admin
Only players/console with endwar.admin can use start, stop and reload.
/endwar status should show whether End War is currently active.
- Duplicate Protection
- If
/endwar start is used while already active, do not create another BossBar. - Send:
"End War is already active!"
- If
/endwar stop is used while inactive, send:
"End War is not active!"
- Player Join Handling
If End War is already active and a player joins the server:
- Automatically show them the BossBar.
- Do NOT show the start Title again to joining players.
- Only the BossBar should appear for them.
- Configuration
Create a fully configurable config.yml.
Example:
bossbar: enabled: true text: "⚔ END WAR — SEASON 2" color: RED style: SOLID
start: title: "⚔ END WAR STARTED!" subtitle: "Season 2 Finale" chat: "&c&l⚔ END WAR &fhas officially started!" sound: "ENTITY_ENDER_DRAGON_GROWL"
stop: title: "END WAR ENDED" subtitle: "Season 2 has come to an end." chat: "&c&lEND WAR &fhas officially ended." sound: "UI_TOAST_CHALLENGE_COMPLETE"
messages: no_permission: "&cYou don't have permission to use this command." already_active: "&eEnd War is already active!" not_active: "&eEnd War is not active." started: "&aEnd War started successfully." stopped: "&aEnd War stopped successfully." reloaded: "&aEndWarBar configuration reloaded."
permissions: admin: "endwar.admin"
- Technical Requirements
- Use Java.
- Target Paper 1.21.11.
- Use the Paper/Bukkit BossBar API.
- No external dependencies.
- Use Adventure/MiniMessage or Bukkit color translation where appropriate.
- Properly handle plugin enable/disable.
- On plugin reload/restart, do not leave duplicate BossBars.
- Keep the code clean and organized.
- Include
plugin.yml. - Include complete source code for every Java class.
- Include
config.yml. - Include build configuration (Maven
pom.xml or Gradle). - Make sure the project can compile without modifications.
- Important:
Do NOT add custom weapons, GUIs, minigames, economy systems, NPCs, or other unnecessary features.
This should feel like a normal vanilla SMP event announcement system.
At the end, provide the complete project structure and all required files.