H

give me a minecraft plugin that will do: if a player hits an another player then make both player between a comabt.

  • timer will be 15seconds.
  • after killing make the attacker out of comabt log.
  • to come in comebat one of the player must have to hit 3hits.
  • then the timer resets after every hit.
  • if one of them leaves before the 15seconds timer then make the player killed by the attacker.
  • if a 3rd player or even more players conflict between these 2players then don't make the 3rd or even more players in combat with these 2players until one of the players between2 leave or kill.
  • add a combat log counter placeholder %s_combatcounter%. by this it will count the players how much time he/she combat logged.
  • add a discord webhook system too
  • after a comabt log happens between them then send a message at the following dc webhook channel which will include:
  • Logger Name - Opponent Name - Logger Ping - Opponent Ping - Logger Combat counter (how much time he did comabt log including this one) add a time (which time this combat happend IST*). Plugin name StackCombats
Kodari AI
KodariAug 10 at 12:10 pm 1
StackCombats
A Minecraft PvP combat plugin that initiates a 15-second combat timer when two players exchange 3 hits. The timer resets with each subsequent hit. If a combatant logs out before the timer expires, they are marked as killed by their opponent. Third-party players are excluded from combat until one of the original combatants dies or leaves. The plugin tracks and displays a combat-log counter via the %s_combatcounter% placeholder, and integrates a Discord webhook that posts combat-log details including logger name, opponent name, both player pings, the logger's cumulative combat-log count, and the IST timestamp of the event.
  1. Create the Gradle project and plugin metadata for StackCombats.

  2. Implement pair-based combat tracking with a 3-hit entry threshold, 15-second resettable timer, and combat-log kills.

  3. Persist combat-log counters and expose %s_combatcounter% through PlaceholderAPI.

  4. Add asynchronous Discord webhook reporting with IST timestamps and ping details.

Created StackCombats, a Minecraft combat-log plugin with:

  • 15-second combat timer, reset after every hit

  • Combat starts after 3 hits between the same two players

  • Third parties cannot join an existing combat pair

  • Players who disconnect during combat are killed

  • Persistent combat-log counter

  • PlaceholderAPI placeholder: %s_combatcounter%

  • Discord webhook logging with:

    • Logger name

    • Opponent name

    • Both player pings

    • Logger combat counter

    • IST timestamp

    • Plugin name

  • Configurable messages and webhook settings in config.yml

  • Optional PlaceholderAPI support via softdepend

H

everything working bas dc me esa krdo ki jo msg ha wo light blue embeld me aye and uska backgroound dark gray ho

Kodari AI
KodariAug 10 at 12:25 pm 1

Discord webhook message ko embed format mein update kar diya:

  • Light blue color embed

  • Dark gray background Discord ke default dark theme mein

  • Combat details ko structured fields mein show karega

  • IST time footer mein rahega

  • Logger aur opponent details inline fields mein aayengi

H

esa kro ki agar koi banda leave kre comabt me to ek message vi broadcast ho "&e%player% &cloggedout during combat" and dc me wo msg nahi ara webhook per

Kodari AI
KodariAug 10 at 12:37 pm 1
  1. Combat-log broadcast: add the configurable &e%player% &cloggedout during combat message when a combatant leaves.

  2. Discord webhook: ensure the combat-log event sends the embed through the configured webhook.

  • Combat log hone par server broadcast add kar diya: &e%player% &clogged out during combat

  • Discord webhook mein bhi same combat-log message content ke roop mein add kar diya.

  • Existing light-blue embed aur dark Discord background settings preserve hain.

  • Config mein naya option add hua: messages.combat-log-broadcast

H

bhai sab working ha bas esa krdo combat me ho to koi command use na kr paye bas jinpe op ho wohi use kr paye command

Kodari AI
KodariAug 11 at 3:12 pm 1
  1. Combat command restriction: block all player commands while combat mein, except operators.

  2. Configurable denial message: add a message entry and send it to blocked players.

Combat ke dauran commands block kar diye gaye hain:

  • Normal players koi command use nahi kar sakte.

  • OP players commands use kar sakte hain.

  • Blocked command par message aayega: &cYou cannot use commands while in combat.

  • Message config.yml se configurable hai.

H

are nahi wo command cancel hi krdo event hi cancel krdo

Kodari AI
KodariAug 11 at 3:21 pm 1

Combat ke time ab normal players ki command event level par cancel hogi:

Java
event.setCancelled(true);

Blocked command ka message hata diya hai, isliye player ko koi message nahi milega. OP players commands use kar sakte hain.

H

koi command to work nahi krega specially /spawn es command ko work hi na kro

Kodari AI
KodariAug 11 at 3:27 pm 1

Combat ke dauran ab sabhi players ke commands cancel honge, including /spawn.

  • OP bhi command use nahi kar sakta.

  • Command event level par cancel hoga.

  • Player ko koi blocked-command message nahi milega.

  • Combat ke bahar commands normally work karenge.

H

ok now do a thing if player do this command on command "/spawn": clear player's inventory execute console command "effect clear %player%" heal player

on quit: clear player's inventory execute console command "effect clear %player%" heal player

do these things. Agar combat me ho to e work na kre

Kodari AI
KodariAug 12 at 2:39 pm 1
H

ok now do a thing if player do this command on command "/spawn": clear player's inventory execute console command "effect clear %player%" heal player

on quit: clear player's inventory execute console command "effect clear %player%" heal player

do these things. Agar combat me ho to e command or e sab hi work na kre

Kodari AI
KodariAug 12 at 2:48 pm 1
  1. /spawn पर inventory clear, effects clear और heal लागू करना।

  2. Quit पर वही cleanup करना, जबकि combat में /spawn और यह cleanup दोनों निष्क्रिय रहें।

  • /spawn अब combat के बाहर इस्तेमाल करने पर:

    • Inventory clear करेगा

    • effect clear <player> console command चलाएगा

    • Player को full health करेगा

  • Quit करने पर combat के बाहर भी यही cleanup होगा।

  • Combat में /spawn सहित कोई भी command event level पर cancel रहेगा।

  • Combat में quit करने पर combat-log punishment पहले की तरह लागू रहेगा।

H

can you make a sperated plugin for the gapple and potion ghost?

Kodari AI
KodariAug 12 at 3:40 pm 1

I’ll separate the existing golden-apple and potion “ghost” behavior into its own plugin while preserving the current combat plugin’s behavior. First I’ll locate how those mechanics are currently implemented, then I’ll split only the relevant code and plugin metadata.Haan, separate plugin bana sakta hoon. Lekin current project mein gapple/potion ghost ka koi existing code nahi mila, isliye exact behavior clarify karna hoga.

Aap “ghost” se kya chahte ho?

  1. Golden apple eat karne ke baad inventory mein item ghost/visible rahe?

  2. Potion drink/throw karne ke baad potion inventory mein ghost rahe?

  3. Ya item consume ho, lekin client ko purana item dikhai de (inventory desync)?

Please ye bhi bata do:

  • Server version: 1.8, 1.20.4, ya koi aur?

  • Gapple: normal golden apple, enchanted golden apple, ya dono?

  • Potions: drinkable, splash, lingering, ya sabhi?

  • Ghost item kitni der rahe aur right-click par kya behavior ho?

Details milte hi standalone plugin ke plugin.yml, main class aur complete listener bana dunga.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
11 625
src/main/java/com/stackcombats/StackCombats.java
package com.stackcombats;

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

public final class StackCombats extends JavaPlugin {
    private CombatManager combatManager;
    private CombatCounterManager counterManager;
    private DiscordWebhook discordWebhook;

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

        counterManager = new CombatCounterManager(this);
        discordWebhook = new DiscordWebhook(this);
        combatManager = new CombatManager(this, counterManager, discordWebhook);
        Bukkit.getPluginManager().registerEvents(combatManager, this);

        if (Bukkit.getPluginManager().isPluginEnabled("PlaceholderAPI")) {
            new StackCombatsExpansion(this, counterManager).register();
        }
    }

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