🎮 Anti-Gang System Fair PvP is now enforced! When 3+ players gang up on one person, their damage is automatically reduced. Fight fair or get nerfed. • 1v1 & 2v2 fights = 100% damage ✅ • 3+ attackers = damage reduced 70-25% ⚠️ • Dynamic & real-time adjustment Make me a prompt for this minecraft plugin
Here’s a clean, detailed prompt you can use (for AI generation, dev documentation, or plugin design):
Prompt:
Create a Minecraft PvP plugin called “Anti-Gang System (Fair PvP)” that dynamically balances combat when multiple players attack a single target.
Core Features:
Detect when multiple players attack the same player within a short time window (e.g., 3–5 seconds).
If 1v1 or 2v2 combat, all players deal 100% normal damage.
If 3 or more attackers target one player, apply a damage reduction system to attackers:
3 attackers → ~70% damage
4 attackers → ~50% damage
5+ attackers → ~25% damage
Damage scaling should be dynamic and update in real time as attackers join or leave combat.
Combat Tracking:
Track attackers per victim using a combat tagging system.
Reset tracking if no damage is dealt within a configurable timeout.
Ensure accuracy even in chaotic fights.
Additional Mechanics:
Only reduce damage for attackers, not the victim.
Prevent exploits such as:
Players briefly hitting and leaving to manipulate scaling
Friendly fire abuse (optional toggle)
Support both melee and projectile damage.
Feedback System:
Notify players when damage is reduced:
Action bar / title message: “⚠️ Anti-Gang: Damage Reduced!”
Optional debug mode showing:
Number of attackers
Current damage multiplier
Configuration:
Fully configurable via config.yml:
Damage scaling percentages
Time window for attacker detection
Minimum attackers to trigger system
Enable/disable messages
Permission support:
Bypass permission (e.g., antigang.bypass)
Performance:
Optimized for large PvP servers.
Use efficient data structures (e.g., HashMaps with timestamps).
Avoid heavy loops or lag spikes.
Compatibility:
Works with Spigot/Paper API (1.20+)
Compatible with other combat plugins if possible.
Goal:
Ensure fair PvP by discouraging ganging while maintaining a smooth and competitive combat experience.
If you want, I can turn this into actual Java plugin code or a ready-to-compile Spigot project.
Working with purpur
Got it—here’s a refined prompt specifically tailored for a Purpur-based Minecraft server (since Purpur has extra config hooks and performance tweaks you can leverage):
🎮 Purpur-Optimized Prompt: Anti-Gang System (Fair PvP) Prompt:
Create a high-performance Minecraft PvP plugin for Purpur (Paper-compatible) called “Anti-Gang System (Fair PvP)” that dynamically reduces damage when multiple players attack a single target.
⚙️ Core Mechanics Detect when multiple unique players damage the same target within a configurable time window (default: 4 seconds).
Classify combat scenarios:
1v1 or 2v2 → 100% damage
3+ attackers → apply scaling reduction:
3 attackers → 70% damage
4 attackers → 50% damage
5+ attackers → 25% damage
Scaling must be real-time and recalculated every hit.
🧠 Combat Tracking System Use UUID-based tracking of attackers per victim.
Store:
Last hit timestamp
Active attackers set
Remove attackers after timeout expires.
Handle:
Melee hits
Projectiles (track shooter properly)
Indirect damage sources (optional toggle)
⚡ Purpur Optimization Use async-safe logic where possible, but ensure all entity interaction stays on main thread.
Minimize object creation inside events like EntityDamageByEntityEvent.
Use fast collections (e.g., primitive maps or optimized HashMaps).
Take advantage of Purpur/Paper:
Event priorities for compatibility
Optional integration with Purpur config (if needed)
🛡️ Exploit Prevention Prevent:
Hit-and-run scaling abuse (require minimum participation time or hit count)
Fake attackers (alt accounts detection optional)
Optional:
Ignore teammates (scoreboard/team support)
Ignore party members (hook into popular party plugins)
📢 Player Feedback Action bar (preferred for Purpur servers):
⚠ Anti-Gang: Damage Reduced (X attackers)
Optional:
Sound effect when nerf applies
Boss bar (toggleable)
📁 Configuration (config.yml) combat: timeout-seconds: 4 min-attackers: 3
scaling: 3: 0.7 4: 0.5 5: 0.25
messages: enabled: true actionbar: true
permissions: bypass: antigang.bypass
hooks: ignore-teams: true ignore-parties: false 🔑 Permissions antigang.bypass → ignores all reductions
antigang.debug → shows attacker count + multiplier
🔄 Events & API Listen to:
EntityDamageByEntityEvent
Provide API:
getAttackerCount(Player victim)
getDamageMultiplier(Player victim)
🎯 Goal Deliver a lag-free, competitive PvP balancing system optimized for Purpur servers, ensuring fair fights without ruining team combat dynamics.