Oliver

Make a plugin when a player joins there are givena unique coulour, and when a player is killed by another player there name turn to the coulour of the killer and they are now on a team, there is no freindly fire and if one of the followers of the captain (The captain is the original owner of the coulour) kills somewone they still go to the coulour of the captain, for every member in a coulour the leader gain 1 permanent haert, if the captain of a team is killed, him and all his followers onto the coulour of the killer and is now part of there team, the border is 10 000 by 10 000 but the command /border shrink/grow (Then a number) will edit the border size

Kodari AI
KodariSep 5 at 1:50 am 2
ColorWarTeams
A Minecraft plugin that assigns each joining player a unique color. When a player kills another, the victim's name changes to the killer's color and they join the killer's team. Friendly fire is disabled. Kills by followers still convert victims to the captain's color. Each team member grants the captain one permanent heart. If a captain is killed, the entire team converts to the killer's color. The world border is 10,000 by 10,000, adjustable via /border shrink/grow [number].
  1. Create the Gradle project and plugin metadata.

  2. Add persistent team/color management, kill handling, friendly-fire protection, and permanent leader hearts.

  3. Add the configurable 10,000×10,000 world border and /border shrink|grow <number> command.

Created the ColorTeams plugin with:

  • Unique persistent colors assigned on join.

  • PvP kills transfer victims to the killer’s captain team.

  • Killing a captain transfers their entire team.

  • Friendly fire disabled within teams.

  • Captains gain one permanent heart per follower.

  • Persistent team and color data in teams.yml.

  • Default 10,000 × 10,000 world border.

  • /border shrink <amount> and /border grow <amount> commands.

  • Border sizes persist per world.

Oliver

What version this for?

Kodari AI
KodariSep 5 at 2:23 am 1

This plugin is built for Paper 1.21.4 and requires Java 21.

The plugin.yml uses api-version: '1.20', but the build dependency is specifically:

Gradle
io.papermc.paper:paper-api:1.21.4-R0.1-SNAPSHOT

It may work on nearby Paper 1.21 versions, but it is intended for Paper 1.21.4.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
11 519
src/main/java/com/kodari/colorteams/ColorTeamsPlugin.java
package com.kodari.colorteams;

import com.kodari.colorteams.border.BorderCommand;
import com.kodari.colorteams.border.BorderManager;
import com.kodari.colorteams.team.TeamListener;
import com.kodari.colorteams.team.TeamManager;
import java.util.Objects;
import org.bukkit.plugin.java.JavaPlugin;

public final class ColorTeamsPlugin extends JavaPlugin {

    private TeamManager teamManager;
    private BorderManager borderManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();

        teamManager = new TeamManager(this);
        teamManager.load();

        borderManager = new BorderManager(this);
        borderManager.initializeWorldBorders();

        getServer().getPluginManager().registerEvents(new TeamListener(this, teamManager), this);
        getServer().getPluginManager().registerEvents(borderManager, this);

        BorderCommand borderCommand = new BorderCommand(borderManager);
        Objects.requireNonNull(getCommand("border")).setExecutor(borderCommand);
        Objects.requireNonNull(getCommand("border")).setTabCompleter(borderCommand);
    }

    @Override
    public void onDisable() {
        if (teamManager != null) {
            teamManager.save();
        }
    }
}