w.ekxnsh_

When a combat log occurs, the plugin records the following information:

UID (UUID) – Unique ID of the player Player Name – The name of the player who logged out Health – The health the player had before logging out Coordinates – Player location (X, Y, Z) where the logout happened Opponent Name – The player they were fighting This information helps admins understand the situation of the combat log.The plugin connects to Discord using a webhook URL.

When a combat log is detected, the plugin sends a formatted message to a Discord channel.

Kodari AI
KodariFeb 27 at 12:04 pm 6,671 (v2)

I’ll create a combat log tracking plugin with Discord webhook integration.

CombatLogTracker
A plugin that tracks and logs combat logging incidents. When players log out during combat, it records their UUID, name, health, coordinates, and opponent information. The plugin sends formatted notifications to Discord via webhook, helping admins monitor and manage combat logging situations effectively. Features configurable combat timers and comprehensive logging.

Combat log tracking plugin created with Discord webhook integration! The plugin records UUID, player name, health, coordinates, and opponent information when players log out during combat, sending formatted notifications to Discord for admin oversight.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
10 491
src/main/java/com/combatlogtracker/CombatLogTracker.java
package com.combatlogtracker;

import com.combatlogtracker.listener.CombatListener;
import com.combatlogtracker.manager.CombatManager;
import com.combatlogtracker.manager.ConfigManager;
import com.combatlogtracker.webhook.DiscordWebhook;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class CombatLogTracker extends JavaPlugin {

    private ConfigManager configManager;
    private CombatManager combatManager;
    private DiscordWebhook discordWebhook;

    @Override
    public void onEnable() {
        this.configManager = new ConfigManager(this);
        this.combatManager = new CombatManager(this);
        this.discordWebhook = new DiscordWebhook(this);

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

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

    @Override
    public void onDisable() {
        if (combatManager != null) {
            combatManager.shutdown();
        }
        getLogger().info("CombatLogTracker has been disabled!");
    }
}