novaboba2503

make me a combat plugin where when someone is getting hitted from only an player he should be tagged in combat for 15 seconds. make a text in the action bar called: Combat: timer combat should be white and the timer 15 seconds how long hes in combat in brighter blue make a settings or config aswell so you can change type like the combat text in the action bar if you should get killed after loggin out while being in combat or if you should be able to type commands make it even so when ur out of combat the combat text with timer in the action goes aweay with a smooth animation an comes with an smooth animation aswell if the player got killed with who you were in combat combat should automaticly be removed

Kodari AI
KodariJul 12 at 9:06 am 8
CombatGuard
CombatGuard provides a configurable player-versus-player combat tagging system for Minecraft servers. Players are tagged for a configurable duration after taking direct damage from another player, with a smoothly animated action bar displaying the white “Combat:” label and bright blue countdown timer. Server owners can customize the duration, action bar format, animation timing, command restrictions, allowed commands, logout punishment, and combat messages. Combat tags expire automatically and are removed when involved players die.
  • Create a Gradle-based Bukkit/Paper plugin with configurable combat tagging.

  • Track direct player-versus-player damage for 15 seconds by default.

  • Add animated action bar countdowns, command restrictions, logout punishment, and automatic tag cleanup.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
8 541
src/main/java/com/kodari/combatguard/CombatGuardPlugin.java
package com.kodari.combatguard;

import org.bukkit.plugin.java.JavaPlugin;

public final class CombatGuardPlugin extends JavaPlugin {

    private CombatManager combatManager;
    private ActionBarManager actionBarManager;

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

        actionBarManager = new ActionBarManager(this);
        combatManager = new CombatManager(this, actionBarManager);

        getServer().getPluginManager().registerEvents(
                new CombatListener(this, combatManager),
                this
        );
    }

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

        if (actionBarManager != null) {
            actionBarManager.shutdown();
        }
    }

    public CombatManager getCombatManager() {
        return combatManager;
    }

    public ActionBarManager getActionBarManager() {
        return actionBarManager;
    }
}