Lakshay Ahlawat

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:

  1. 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.
  1. 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.

  1. 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.
  1. 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.

  1. 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!"

  1. 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.
  1. 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"

  1. 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.
  1. 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.

Kodari AI
KodariSep 26 at 2:29 pm 1
EndWarBar
Lightweight Paper plugin for SMP End War events. Admin commands start/stop a global BossBar with configurable text, color, and style. Sends configurable titles, chat messages, and sounds to all online players on event start/stop. Auto-shows BossBar to joining players during active events. Includes duplicate protection, status command, reload support, and full config.yml customization. Vanilla-style, no extra features.
  1. Set up a Java 21 Maven project targeting Paper 1.21.11.

  2. Add the configurable event manager, command handling, and join behavior.

  3. Add plugin.yml and config.yml with the requested defaults and permission.

Created EndWarBar as a Java 21 Maven plugin targeting Paper 1.21.11. It includes the configurable BossBar, start/stop announcements, duplicate protection, join handling, permission checks, and cleanup on plugin disable.

Plain Text
pom.xml
src/
└── main/
    ├── java/com/kodari/endwarbar/
    │   ├── EndWarBarPlugin.java
    │   ├── EndWarCommand.java
    │   ├── EndWarManager.java
    │   ├── PlayerJoinListener.java
    │   └── TextUtil.java
    └── resources/
        ├── config.yml
        └── plugin.yml

Build with mvn package. Use /endwar start, /endwar stop, /endwar reload, and /endwar status; endwar.admin is required for start, stop, and reload.

Kodari can make mistakes. Review important code before using.
Files
src
pom.xml
Code
8 373
src/main/java/com/kodari/endwarbar/EndWarBarPlugin.java
package com.kodari.endwarbar;

import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

public final class EndWarBarPlugin extends JavaPlugin {
    private EndWarManager manager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        manager = new EndWarManager(this);

        EndWarCommand endWarCommand = new EndWarCommand(this, manager);
        getCommand("endwar").setExecutor(endWarCommand);
        getCommand("endwar").setTabCompleter(endWarCommand);
        Bukkit.getPluginManager().registerEvents(new PlayerJoinListener(manager), this);
    }

    @Override
    public void onDisable() {
        if (manager != null) {
            manager.shutdown();
        }
    }
}