instinct_gg

create a plugin in which we can create team in which if the leader dies one time then then his teamates will also not respawn

Kodari AI
KodariFeb 25 at 2:00 am 16,830 (v2)

I’ll create a hardcore team survival plugin where teams are eliminated when their leader dies.

HardcoreTeams
A hardcore team survival plugin where players form teams with designated leaders. When a team leader dies once, all teammates are prevented from respawning and the entire team is eliminated. Features team creation and management, leader designation, death tracking, respawn blocking, and persistent data storage. Includes commands for team management and admin oversight with customizable messages and settings.

Plugin created successfully! HardcoreTeams allows players to form teams where the entire team is eliminated when the leader dies once. Features include team creation, invites, leadership transfer, death tracking, respawn blocking for eliminated teams, and admin commands for management.

instinct_gg

no the entire team will not eliminated that time they will die by somehing then not respawn

Kodari AI
KodariFeb 25 at 2:06 am 10,381 (v2)

I need to read the current files to understand the elimination logic and respawn handling.

I see the issue. Currently, when the team leader dies, the entire team is immediately eliminated. Instead, the team should only be eliminated when all members have died, and players who die should not respawn.

Plan:

  • Add deadMembers list to Team to track who has died

  • When any player dies, add them to deadMembers

  • Check if all members are dead (deadMembers.size() == members.size()), then eliminate team

  • Respawn prevention stays the same (already checks if team is eliminated)

Players now die naturally and are tracked individually. When all team members have died, the team becomes eliminated and no one can respawn. Dead members list persists across server restarts.

instinct_gg

no if the leader dies ones he will not respawn and his all teamates has only 1 life after the death of team leader

Kodari AI
KodariFeb 25 at 2:24 am 21,248 (v2)

I need to read the relevant files to understand and fix this bug.

I can see the issue. The current system doesn’t implement a lives system at all - every player only has 1 death. Let me fix this by implementing proper lives tracking.

Analysis:

  • Currently, players are marked dead permanently after 1 death

  • No lives system exists (leader should have 3 lives, members should have their own lives)

  • Need to add lives tracking and proper death/respawn logic

instinct_gg

bro members have unlimited life and leader has one life but if leader die then the whole team members lives will change into 1 if the are online/offline

Kodari AI
KodariFeb 25 at 2:27 am 13,011 (v2)

I’ll read the current files to understand the implementation and make the necessary changes.

Based on your requirement, I’ll modify the plugin so that:

  • Members have unlimited lives until the leader dies

  • Leader has 1 life

  • When the leader dies, all team members (online/offline) get their lives changed to 1

Modified the plugin so members have unlimited lives (Integer.MAX_VALUE) until the leader dies, at which point all team members (online/offline) get exactly 1 life, and the team is only eliminated when everyone has 0 lives.

instinct_gg

in this plugin i tested it and i create a team and become a leader my life set to 1 but when i die i can respawn idk how

Kodari AI
KodariFeb 25 at 2:54 am 7,800 (v2)

I need to read the files to identify the issue with the death/respawn logic.

I found the bug! When the leader dies, the code sets all members’ lives to 1, including the leader who just died. This overwrites the leader’s 0 lives back to 1, allowing them to respawn.

The Issue:

  • Leader dies → lives decremented to 0 ✓

  • Leader marked as dead ✓

  • Then team.setAllMembersLives(1) sets all members to 1 life, including the dead leader ✗

The Fix: When setting all members to 1 life after leader death, we need to exclude the leader themselves.

Fixed the bug where the leader could respawn after dying by ensuring the leader’s lives remain at 0 when setting other members’ lives to 1.

instinct_gg

add team name and show the name in tab list and also off natural death life decreasing

Kodari AI
KodariFeb 25 at 3:36 am 19,323 (v2)

I’ll read the existing files to understand the current implementation and then add team names, tab list display, and disable natural death life decreasing.

I’ll add team names, display them in the tab list, and disable natural death life decreasing (only PvP deaths will decrease lives).

All changes implemented:

  1. Team names - Teams now require a name when created with /team create <name> (max 16 characters)

  2. Tab list display - Players show their team name in tab list with format [TeamName] PlayerName (customizable via tab-list-format in config)

  3. PvP-only deaths - Lives only decrease when killed by another player; natural deaths (fall damage, mobs, etc.) no longer affect lives

instinct_gg

in this plugin add points system and add egghunt in which a cords is given in the world where egg spawn and first player to click 10 points

Kodari AI
KodariFeb 26 at 10:38 am 28,204 (v2)

I’ll add a points system and egg hunt feature to the HardcoreTeams plugin. Let me first read the existing files to understand the structure.

I’ll add a points system and egg hunt feature to the plugin. Here’s my plan:

  1. Add points field to Team data class

  2. Create EggHuntManager to handle egg spawning and location tracking

  3. Create EggHuntListener to handle player clicking eggs

  4. Create EggHuntCommand for admin controls

  5. Update config with egg hunt settings

Points system and egg hunt feature added successfully! Teams now track points, and admins can spawn eggs at random coordinates that give 10 points to the first player who clicks them.

instinct_gg

make egg 25 points and add doomsday where admin start doomsday where anyone dies perm ban and the person killing in that period get 30 points and if we kill a team leader in doomsday then we get 50 points and doomsday end

instinct_gg

how many tokens left?

instinct_gg

add doomsday where admin start doomsday where anyone dies perm ban and the person killing in that period get 30 points and if we kill a team leader in doomsday then we get 50 points and doomsday end and add leaderboard of point

Kodari can make mistakes. Review important code before using.
Files
src
.gitignore
build.gradle
settings.gradle
Code
19 2,087
src/main/java/com/hardcoreteams/HardcoreTeams.java
package com.hardcoreteams;

import com.hardcoreteams.commands.EggHuntCommand;
import com.hardcoreteams.commands.TeamAdminCommand;
import com.hardcoreteams.commands.TeamCommand;
import com.hardcoreteams.listeners.EggHuntListener;
import com.hardcoreteams.listeners.PlayerDeathListener;
import com.hardcoreteams.listeners.PlayerJoinListener;
import com.hardcoreteams.listeners.PlayerRespawnListener;
import com.hardcoreteams.managers.ConfigManager;
import com.hardcoreteams.managers.EggHuntManager;
import com.hardcoreteams.managers.PlayerDataManager;
import com.hardcoreteams.managers.TeamManager;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public final class HardcoreTeams extends JavaPlugin {

    private ConfigManager configManager;
    private TeamManager teamManager;
    private PlayerDataManager playerDataManager;
    private EggHuntManager eggHuntManager;

    @Override
    public void onEnable() {
        this.configManager = new ConfigManager(this);
        this.teamManager = new TeamManager(this);
        this.playerDataManager = new PlayerDataManager(this);
        this.eggHuntManager = new EggHuntManager(this);

        configManager.loadConfig();
        teamManager.loadTeams();
        playerDataManager.loadData();

        registerCommands();
        registerListeners();

        getLogger().info("HardcoreTeams has been enabled!");
    }

    @Override
    public void onDisable() {
        if (eggHuntManager != null) {
            eggHuntManager.cleanup();
        }
        if (teamManager != null) {
            teamManager.saveTeams();
        }
        if (playerDataManager != null) {
            playerDataManager.saveData();
        }

        getLogger().info("HardcoreTeams has been disabled!");
    }

    private void registerCommands() {
        getCommand("team").setExecutor(new TeamCommand(this));
        getCommand("teamadmin").setExecutor(new TeamAdminCommand(this));
        EggHuntCommand eggHuntCommand = new EggHuntCommand(this);
        getCommand("egghunt").setExecutor(eggHuntCommand);
        getCommand("egghunt").setTabCompleter(eggHuntCommand);
    }

    private void registerListeners() {
        getServer().getPluginManager().registerEvents(new PlayerDeathListener(this), this);
        getServer().getPluginManager().registerEvents(new PlayerRespawnListener(this), this);
        getServer().getPluginManager().registerEvents(new PlayerJoinListener(this), this);
        getServer().getPluginManager().registerEvents(new EggHuntListener(this), this);
    }
}