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
Create the Gradle project and plugin metadata for StackCombats.
Implement pair-based combat tracking with a 3-hit entry threshold, 15-second resettable timer, and combat-log kills.
Persist combat-log counters and expose
%s_combatcounter%through PlaceholderAPI.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.ymlOptional PlaceholderAPI support via
softdepend
everything working bas dc me esa krdo ki jo msg ha wo light blue embeld me aye and uska backgroound dark gray ho
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
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
Combat-log broadcast: add the configurable
&e%player% &cloggedout during combatmessage when a combatant leaves.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 combatDiscord webhook mein bhi same combat-log message
contentke 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
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
Combat command restriction: block all player commands while combat mein, except operators.
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.ymlse configurable hai.
are nahi wo command cancel hi krdo event hi cancel krdo
Combat ke time ab normal players ki command event level par cancel hogi:
event.setCancelled(true);
Blocked command ka message hata diya hai, isliye player ko koi message nahi milega. OP players commands use kar sakte hain.
koi command to work nahi krega specially /spawn es command ko work hi na kro
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.
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
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
/spawnपर inventory clear, effects clear और heal लागू करना।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 पहले की तरह लागू रहेगा।
can you make a sperated plugin for the gapple and potion ghost?
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?
Golden apple eat karne ke baad inventory mein item ghost/visible rahe?
Potion drink/throw karne ke baad potion inventory mein ghost rahe?
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.
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();
}
}
}