Compatibility
Minecraft: Java Edition
Platforms
Tags
Creators
Details
** š MaceCooldown Plugin - Complete Description
šÆ Overview
MaceCooldown is a lightweight, performance-optimized Minecraft plugin designed for Paper/Spigot 1.21.1-1.21.11 servers. It introduces a strategic cooldown mechanic to the Mace weapon, preventing spam attacks and adding tactical depth to PvP and PvE combat scenarios.
When a player attacks any entity using a Mace, the weapon is placed on cooldown for a configurable duration, during which the player cannot use the Mace again. This creates balanced gameplay and prevents overpowered Mace spamming.
⨠Key Features
1. Cooldown System
- ā±ļø Configurable Duration: Set cooldown time in seconds (default: 120 seconds / 2 minutes)
- š® Native Minecraft API: Uses official
Player.setCooldown()method for seamless integration - š Automatic Conversion: Seconds automatically converted to Minecraft ticks (1 second = 20 ticks)
- š¬ Player Feedback: Visual messages inform players when cooldown is applied
2. Smart Detection
- šÆ Entity Attack Trigger: Activates only when a player actually hits an entity
- ā Main Hand Detection: Only triggers when Mace is in the main hand slot
- š”ļø Entity-Agnostic: Works with all entity types (players, mobs, bosses, custom entities)
3. Configuration System
- š Fully Customizable: Edit
config.ymlto suit your server needs - š Toggle On/Off: Completely disable the plugin without uninstalling
- š Hot Reload: Apply config changes without server restart using
/macecooldown reload - š Well-Documented: Config file includes clear comments for each setting
4. Administration
- š Admin Commands:
/macecooldown reloadfor managing the plugin - š Permission System:
macecooldown.adminpermission (OP by default) - š Status Feedback: Command shows current configuration when reloading
5. Performance & Compatibility
- ā” Lightweight: Minimal resource usage, optimized event handling
- š® Modern Minecraft: Supports 1.21.1 through 1.21.11
- ā Java 21: Built with the latest Java LTS for maximum performance
- š Paper/Spigot: Compatible with both server platforms
š® Use Cases & Applications
PvP Servers
- Balance Combat: Prevent Mace spam in duels and arenas
- Strategic Gameplay: Players must time their Mace attacks carefully
- Weapon Diversity: Encourages switching between different weapons
- Skill-Based Fighting: Rewards tactical thinking over button mashing
Survival/SMP Servers
- Boss Fights: Make boss battles more challenging and engaging
- Mob Grinding: Prevent trivializing mob farms with Mace spam
- Resource Balance: Encourages varied weapon use and durability management
RPG/Adventure Servers
- Class Systems: Integrate with class-based systems for warrior cooldowns
- Quest Balance: Make quests more challenging by limiting powerful weapons
- Progression Control: Gate powerful Mace usage behind cooldown mechanics
Mini-Games
- PvP Arenas: Add strategic depth to combat mini-games
- Custom Events: Create timed challenges with weapon cooldowns
- Tournament Balance: Ensure fair fights in competitive events
š§ How It Works
Technical Flow:
1. Player attacks entity with Mace in main hand
ā
2. Plugin detects EntityDamageByEntityEvent
ā
3. Checks if cooldown-enabled = true
ā
4. Validates attacker is a Player
ā
5. Checks if weapon is Material.MACE
ā
6. Converts config seconds to ticks (seconds Ć 20)
ā
7. Applies cooldown using player.setCooldown(Material.MACE, ticks)
ā
8. Player receives feedback message
ā
9. Mace cannot be used until cooldown expires
Visual Player Experience:
- ā Before Cooldown: Mace works normally
- āļø Attack Entity: Player hits any mob/player with Mace
- ā³ Cooldown Activates: Mace icon shows cooldown animation
- š¬ Message Appears: "Mace cooldown applied for 120 seconds!"
- ā±ļø Wait Period: Player must wait (or switch weapons)
- ā Cooldown Expires: Mace becomes usable again
āļø Configuration Details
config.yml Breakdown:
cooldown-enabled: true
- Type: Boolean (
trueorfalse) - Default:
true - Purpose: Master toggle for the entire plugin
- Effect: When
false, plugin does nothing (useful for temporary disabling)
cooldown-seconds: 120
- Type: Integer (whole number)
- Default:
120(2 minutes) - Range: Any positive number (recommended: 10-300)
- Purpose: Duration in real-world seconds
- Conversion: Automatically multiplied by 20 for Minecraft ticks
Configuration Examples:
| Use Case | cooldown-seconds | Real Time | Best For |
|---|---|---|---|
| Fast-Paced PvP | 30 | 30 seconds | Quick respawn servers |
| Balanced PvP | 60 | 1 minute | Arena/duels |
| Default | 120 | 2 minutes | General use |
| Hard Survival | 180 | 3 minutes | Challenging PvE |
| Boss Battles | 300 | 5 minutes | Epic encounters |
š Commands & Permissions
Commands:
| Command | Aliases | Description | Permission |
|---|---|---|---|
/macecooldown reload |
/mcd reload |
Reloads config.yml | macecooldown.admin |
Permissions:
| Permission | Default | Description |
|---|---|---|
macecooldown.admin |
OP | Access to reload command and admin functions |
Command Usage:
Reload configuration after editing config.yml
/macecooldown reload
/mcd reload Shorter alias
Output example:
ā MaceCooldown configuration reloaded successfully!
Cooldown enabled: true
Cooldown duration: 120 seconds
š¦ Installation Guide
Step 1: Download
- Compile from source using Maven:
mvn clean package - Or download pre-compiled
.jarfrom releases
Step 2: Install
- Stop your server
- Copy
MaceCooldown-1.0.0.jartoplugins/folder - Start your server
Step 3: Configure
- Find
plugins/MaceCooldown/config.yml(auto-generated) - Edit settings as desired
- Run
/macecooldown reload(no restart needed!)
Step 4: Test
- Join your server
- Get a Mace:
/give @s mace - Attack any mob/player
- Observe cooldown activation
š” Benefits & Advantages
For Server Owners:
- ā Easy Setup: Drop-in installation, works immediately
- ā No Database: Lightweight, no SQL or storage needed
- ā Zero Dependencies: No external plugins required
- ā Customizable: Adjust to your server's needs
- ā Performance: Negligible impact on TPS
For Players:
- ā Fair Combat: No weapon spam abuse
- ā Strategic Depth: More thoughtful combat decisions
- ā Visual Feedback: Clear cooldown indicator
- ā Balanced PvP: Skill matters more than spam-clicking
For Developers:
- ā Clean Code: Well-documented, easy to modify
- ā Modern API: Uses Paper/Spigot best practices
- ā Open Source: Fully customizable
- ā Java 21: Future-proof implementation
š„ļø System Requirements
Server Requirements:
- Minecraft Version: 1.21.1, 1.21.2, 1.21.3, 1.21.4, 1.21.5, 1.21.6, 1.21.7, 1.21.8, 1.21.9, 1.21.10, 1.21.11
- Server Software: Paper (recommended) or Spigot
- Java Version: Java 21 or higher
- RAM: Minimal (< 1MB)
- Storage: < 100KB
Client Requirements:
- No Client Mods Needed: Works with vanilla clients
- Version: Must match server version
šÆ Plugin Behavior Details
What Triggers Cooldown:
ā
Hitting any entity with Mace in main hand
ā
Any successful attack (damage dealt)
ā
PvP attacks (player vs player)
ā
PvE attacks (player vs mob)
What Does NOT Trigger:
ā Mace in off-hand (only main hand counts)
ā Missing attacks (not hitting anything)
ā Attacking while cooldown is disabled in config
ā Attacking with other weapons
ā Breaking blocks with Mace
Cooldown Scope:
- šÆ Per-Player: Each player has their own independent cooldown
- šØ Material-Based: Cooldown applies to ALL Maces in inventory
- š Persistent: Lasts through death, teleports, dimension changes
- ā±ļø Timed: Expires automatically after configured duration
š Performance Metrics
| Metric | Value |
|---|---|
| Event Listeners | 1 (EntityDamageByEntityEvent) |
| Memory Footprint | < 1 MB |
| CPU Impact | Negligible (< 0.1% TPS) |
| Disk Usage | < 100 KB |
| Startup Time | < 50ms |
| Config Reload Time | < 10ms |
š Security & Safety
- ā No Exploits: No known duplication or bypass methods
- ā Permission-Based: Commands protected by permission system
- ā Input Validation: Config values validated on load
- ā Error Handling: Graceful fallback to defaults on invalid config
- ā No External Connections: Completely offline, no telemetry
š Comparison with Alternatives
| Feature | MaceCooldown | Generic Cooldown Plugins | Manual Config |
|---|---|---|---|
| Mace-Specific | ā Optimized | ā ļø Generic | ā Complex |
| Easy Setup | ā 1 file | ā ļø Multiple configs | ā Requires knowledge |
| Performance | ā Lightweight | ā ļø Varies | ā N/A |
| 1.21+ Support | ā Native | ā ļø May lag behind | ā If supported |
| Hot Reload | ā Built-in | ā ļø Varies | ā Requires restart |
š Example Scenarios
Scenario 1: PvP Arena
Setup: 60-second cooldown
Effect: Players can use Mace once per minute in fights
Result: Encourages weapon switching and tactical planning
Scenario 2: Survival Server
Setup: 120-second cooldown (default)
Effect: Mace becomes a powerful but limited tool
Result: Players save Mace for tough mobs, use other weapons for farming
Scenario 3: Boss Battle Event
Setup: 300-second cooldown (5 minutes)
Effect: Mace usable once or twice per boss fight
Result: Makes boss fights more challenging and strategic
Scenario 4: Temporarily Disable
Setup: Set cooldown-enabled: false
Effect: Plugin stays installed but does nothing
Result: Quickly disable for special events, re-enable after
ā FAQ
Q: Does this work with custom Maces from other plugins?
A: Yes, as long as the item type is Material.MACE.
Q: Can I set different cooldowns for different players?
A: Not in this version, but you can modify the code to add permission-based tiers.
Q: Does it work with off-hand Maces?
A: No, only main hand attacks trigger cooldown (design choice for balance).
Q: What happens if I set cooldown to 0?
A: The cooldown will be instant (essentially disabled for that player after attack).
Q: Is there a maximum cooldown limit?
A: No hard limit, but extremely high values (> 1 hour) are impractical.
Q: Does this affect Mace durability?
A: No, normal durability loss still applies.
Q: Can players bypass with multiple Maces?
A: No, cooldown applies to the Material type, affecting all Maces.
š Support & Updates
Getting Help:
- Check
config.ymlcomments for setting explanations - Review console logs for error messages
- Ensure Java 21 and Paper/Spigot 1.21.x are installed
š Why Choose MaceCooldown?
- ā Purpose-Built: Specifically designed for Mace balancing
- ā Modern: Uses latest Minecraft and Java versions
- ā Simple: One plugin, one config, one command
- ā Reliable: Uses native Minecraft API (no hacks)
- ā Free: Open source, no hidden costs
- ā Efficient: Minimal performance impact
- ā Flexible: Customize to your exact needs
MaceCooldown - Balance Your Combat, Enhance Your Server āļø**


