srivastava_king

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:

  1. 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.
  1. 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.
  1. 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.
  1. 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.

Kodari AI
KodariAug 21 at 1:57 pm 2
  1. Create the Gradle project and Paper plugin metadata for Java 21 / Paper 1.21.11.

  2. Implement tagged Custom Mace creation with Wind Burst and Tempest lore.

  3. Add damage, smash AoE, right-click ability, cooldown, armor durability, knock-up, particles, and sound handling.

  4. Add admin commands, configurable messages, and installation/permission documentation.

Implemented the complete CustomMace Paper plugin.

Included:

  • Custom tagged mace named §b⚡ Custom Mace

  • Built-in Wind Burst enchantment

  • Configurable 2× mace damage multiplier

  • Falling smash AoE damage

  • Tempest right-click ability

  • Configurable radius, damage, knock-up, armor durability reduction, cooldown, particles, sounds, and messages

  • Cooldown action-bar notifications

  • PersistentDataContainer item identification

  • /custommace give <player>

  • /custommace reload

  • custommace.admin permission

  • Paper plugin metadata

  • Gradle Java 21 project setup

  • Installation and command documentation in INSTALL.md

The plugin targets Paper 1.21.11 and Java 21.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
INSTALL.md
settings.gradle
Code
11 568
src/main/java/com/kodari/custommace/CustomMacePlugin.java
package com.kodari.custommace;

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

import java.util.Objects;

public final class CustomMacePlugin extends JavaPlugin {
    private CooldownManager cooldownManager;

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

        CustomMaceItem customMace = new CustomMaceItem(this);
        cooldownManager = new CooldownManager(this);
        Bukkit.getPluginManager().registerEvents(new CustomMaceListener(this, customMace, cooldownManager), this);

        CustomMaceCommand command = new CustomMaceCommand(this, customMace);
        Objects.requireNonNull(getCommand("custommace")).setExecutor(command);
        Objects.requireNonNull(getCommand("custommace")).setTabCompleter(command);
    }

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