Create a custom Minecraft Paper plugin for Minecraft Java 1.21.11 called CustomMace.
Custom Mace
Add a new custom mace item to the server called:
§b⚡ Custom Mace
The custom mace should have these abilities:
- Increased Damage
- The Custom Mace must deal 2× the normal damage of a vanilla Minecraft Mace.
- Keep normal mace smash/fall-damage mechanics working.
- It should work correctly with PvP players.
- Custom Smash AoE
When a player attacks another player with the Custom Mace while falling from the air, trigger an area-of-effect attack.
- The primary target receives the normal Custom Mace damage.
- All other players within 10 blocks of the impact location receive exactly 2 hearts (4 HP) of damage.
- Do not damage the attacker.
- Do not damage players outside the 10-block radius.
- The AoE should activate only when the mace attack is a valid falling/smash attack.
- Built-in Wind Burst
The Custom Mace must always have Wind Burst applied to it.
- Wind Burst should be active by default.
- Players should not need to add the enchantment manually.
- The mace should retain its normal Wind Burst behavior.
- Custom Right-Click Ability
Add a custom enchantment/ability to the Custom Mace called:
§d⚡ Tempest
When the player right-clicks while holding the Custom Mace:
- Find all enemy players within 10 blocks of the user.
- Deal exactly 2 hearts (4 HP) of damage to each affected player.
- Reduce the affected player's current armor durability by 5%.
- Apply a Wind Charge-style knock-up effect to affected players, launching them upward into the air.
- Do not affect the user.
- Do not affect players outside the 10-block radius.
Ability Cooldown
The Tempest right-click ability must have a configurable cooldown.
Default cooldown: 15 seconds
Send the user an action-bar message when the ability is on cooldown.
Example: "§cTempest is on cooldown! §7Wait §e{seconds}s"
When the ability becomes available again: "§a⚡ Tempest is ready!"
Visual Effects
When Tempest is activated:
- Spawn wind/air particles around the player.
- Play an appropriate wind/burst sound.
- Make the ability feel powerful but keep the effects optimized for performance.
Configuration
Create a "config.yml" with customizable values for:
- Custom Mace damage multiplier
- AoE radius
- AoE damage
- Tempest radius
- Tempest damage
- Armor durability reduction percentage
- Tempest cooldown
- Knock-up strength
- Particle effects
- Sound effects
- Messages
Compatibility & Safety
- Target platform: Paper 1.21.11
- Use modern Paper/Bukkit APIs compatible with 1.21.11.
- Do not use deprecated APIs where avoidable.
- Do not cause console errors.
- Avoid unnecessary repeating tasks.
- Optimize the AoE detection so it does not create performance issues.
- Make sure the plugin works correctly with multiple players fighting simultaneously.
Commands
Add:
"/custommace give <player>"
Permission: "custommace.admin"
The command should give the specified player the Custom Mace.
Also add:
"/custommace reload"
Permission: "custommace.admin"
Reload the configuration without restarting the server.
Item Protection
The Custom Mace should be identifiable using a unique PersistentDataContainer key so that normal vanilla maces cannot accidentally receive these abilities.
Deliverables
Provide:
- Complete source code
- "plugin.yml"
- "config.yml"
- All required Java classes
- Clear installation instructions
- Permission list
- Command list
The plugin must compile and run on Paper 1.21.11.