Build a complete Minecraft 1.21.11 Bukkit/Paper plugin implementing three custom mace enchantments. Use the project's existing build setup and APIs; do not add tests. This is a server plugin, not a mod.

Enchantment framework and access:

  • Implement plugin-managed custom enchantments on MACE items using PersistentDataContainer keys, with readable lore on the item. Do not rely on unsafe/internal NMS or assume custom enchantments can be registered through the vanilla registry.
  • Add a command /maceenchants with aliases if appropriate. /maceenchants apply <stunslam|boogiebum|smashmash> [level] applies to the mace held in the player's main hand; /maceenchants remove <stunslam|boogiebum|smashmash> removes that enchant from the held mace; /maceenchants or /maceenchants help shows usage. Restrict admin/apply/remove command to an appropriate permission and provide clear messages/errors. Validate levels: Stun Slam I only, Boogie Bum I–III, Smash Mash I–II. Ensure only mace items can be enchanted. Persist Boogie Bum charge on the item so it survives relogs and moving between inventories.
  • Custom enchant metadata must not interfere with normal mace behavior or vanilla enchantments. Keep lore consistent when applying/removing enchants; do not duplicate custom lore lines.

Behaviors:

  1. Stun Slam I: when the wielder hits a living target with the enchanted mace, if the target is actively blocking with a shield, immediately interrupt/disable shield use and apply a meaningful shield cooldown (about 5 seconds), while preserving the normal mace hit and damage. Handle shields in either hand. Do not cancel the hit event.
  2. Boogie Bum I–III: each successful hit on a living target with the enchanted mace adds 10 percentage points of charge, capped at 100%; show current charge as an action-bar percentage to the wielder. When fully charged, swapping the enchanted mace from main hand into offhand with the F hand-swap action triggers a wind pulse centered on the wielder, resets charge to 0, and stores the new charge persistently. Pulse damages nearby living entities other than the user for exactly 5 hearts (level I), 6 hearts (II), or 8 hearts (III) (convert hearts to Bukkit damage points), with a 5-block radius, plus a wind-like particle/sound and outward knockback. Do not trigger unless that Boogie Bum mace is the item being moved to offhand and has 100% charge. Prevent exploiting the event to trigger twice.
  3. Smash Mash I–II: on a successful mace hit while the attacker is sneaking at the moment of impact, freeze the living target for 2 seconds (including players): prevent movement by applying appropriate potion/effect and/or temporarily suppressing movement, without permanently affecting them; restore movement/state reliably after the duration and handle relogs/disconnects safely. Level I and II share the stated 2-second duration unless a meaningful difference is required; do not invent extra effects.

Implementation quality:

  • Support players and other living entities where specified, handle null/offhand/non-mace safely, and avoid recursive or duplicate hit processing. Include plugin.yml command/permission metadata as required, and reasonable player-facing feedback for charge, activation, invalid commands, and invalid targets. Make sure all code targets the project's Minecraft 1.21.11-compatible server API. Finish by reporting what was implemented and any command usage/limitations.
Kodari AI
KodariOct 24 at 4:42 pm 2
MaceEnchantments
Minecraft 1.21.11 Bukkit plugin adding three custom mace enchantments via PersistentDataContainer. Stun Slam disables shields on hit with 5-second cooldown. Boogie Bum charges 10% per hit, triggers wind pulse on F-swap at 100% charge, dealing 5-8 hearts damage with knockback. Smash Mash freezes targets for 2 seconds when sneaking. Includes /maceenchants command for applying/removing enchants with level validation, persistent charge storage, and lore management.
  1. Create the Paper 1.21.11 project entry points, plugin metadata, and command handling.

  2. Implement persistent mace enchant data, charge/lore synchronization, and all three combat effects.

  3. Register listeners and keep freeze, shield, and pulse behavior safe against repeat triggers and disconnects.

Created the Paper 1.21.11 plugin with persistent, lore-backed mace enchantments and registered commands/listeners.

  • /maceenchants apply <stunslam|boogiebum|smashmash> [level] applies an enchant to the main-hand mace; omitting the level defaults to I.

  • /maceenchants remove <stunslam|boogiebum|smashmash> removes one enchant. /maceenchants and /maceenchants help show usage.

  • Applying and removing require maceenchants.admin (default: operators). Aliases: /maceenchant and /maceen.

  • Stun Slam I interrupts an actively blocking shield user and applies a five-second cooldown.

  • Boogie Bum I–III gains 10% charge per successful hit. At 100%, swapping that mace from main hand to offhand triggers the pulse, resets its persistent charge, and deals 10/12/16 damage points within five blocks, with knockback and wind effects.

  • Smash Mash I–II freezes sneaking-hit targets for two seconds. Player movement is suppressed temporarily; mobs have their AI restored after the duration. Disconnecting clears a player’s freeze safely.

The enchantments use plugin-managed item data rather than vanilla registry or NMS registration. Smash Mash levels share the same duration and effect.

Update the existing MaceEnchants plugin to ensure each special move has a visible particle effect, including Stun Slam and Smash Mash. Current MaceEnchantListener already uses XSeries XParticle/XSound: Boogie Bum's pulse() emits GUST particles and a wind-burst sound. In onMaceHit(), Stun Slam currently clears the target's active shield and sets a 100-tick shield cooldown but has no effect visuals; Smash Mash calls freeze(target) but has no effect visuals. Add distinct, clearly visible thematic particle effects (and fitting sound effects if appropriate) at the affected target/location when Stun Slam successfully disables a blocking shield, and when Smash Mash actually freezes a target. Only emit each effect when its corresponding ability activates, not for ordinary hits; keep hit/damage behavior unchanged, preserve existing Boogie Bum visuals, use the existing XSeries abstractions/dependencies and APIs compatible with this project's Paper 1.21.11 setup. Avoid unsafe NMS. Do not add tests. Finish with a concise summary of changes.

Kodari AI
KodariOct 24 at 4:43 pm 1
  • Add distinct XSeries particle bursts and sounds only after Stun Slam interrupts a shield or Smash Mash successfully freezes a supported target.

Added distinct XSeries visuals and sounds to MaceEnchantListener: Stun Slam now shows sparks and a shield-break sound when it interrupts a blocking shield; Smash Mash shows a critical-hit/cloud burst and anvil sound when it successfully freezes a player or mob. Effects only play on activation; hit behavior and Boogie Bum visuals are unchanged.

_oliwierek_

dosnt work when im trying to enchant it i showes no name to the enchant and i cant clikc it

Kodari AI
KodariOct 24 at 5:36 pm 1

The custom enchantments won’t appear in the vanilla enchanting table: they’re plugin-managed, so Minecraft has no enchantment name there to click.

Hold a mace in your main hand and use a command, for example:

  • /maceenchants apply stunslam

  • /maceenchants apply boogiebum 2

  • /maceenchants apply smashmash

Applying enchantments requires the maceenchants.admin permission, which defaults to OP. The enchantment name and level should then appear in the mace’s lore. If you want a clickable menu, I can add one—but it would be a plugin menu, not the vanilla enchanting table.

_oliwierek_

make that it apper in enchanting table

Kodari AI
KodariOct 24 at 6:05 pm 1

I’ll connect the table’s mace offer to a clickable plugin menu with every valid enchant level. Vanilla cannot display plugin-managed effects as native enchantments without registry/NMS changes, so the menu will appear when a mace is placed in the table.

When you place a mace in the enchanting table, a clickable Mace Enchantments menu now opens with Stun Slam I, Boogie Bum I–III, and Smash Mash I–II.

These are plugin-managed enchantments, so they appear in that menu rather than as native vanilla enchantment offers. Applying one currently costs no XP or lapis.

_oliwierek_

okay if you cant do it how the other plugin about new enchants can do it?

Kodari AI
KodariOct 24 at 6:07 pm 1

Other plugins usually make custom enchantments appear in the enchanting table in one of two ways:

  • Datapack-defined enchantments: Minecraft’s data-driven enchantment system can add enchantments to the server’s enchantment registry. The plugin then detects those enchantments and implements their special behavior. This is the more standards-based route, but it requires the enchantment definitions to be supplied and loaded as datapack data.

  • Internal server access (NMS): Some plugins modify Minecraft’s internal registries directly. That can enable custom table offers, but it depends on server internals and may break across Minecraft updates.

This plugin currently stores its enchantments as plugin data on the mace, so the vanilla table does not recognize them as enchantments. The menu workaround is separate from the native table. If you share the name of the other plugin, I can explain which approach it uses.

_oliwierek_

can you add when you enchant a mace in enchanting table a button for a custom enchants for mace?

Kodari AI
KodariOct 24 at 6:13 pm 1

Not as an extra button inside Minecraft’s vanilla enchanting-table screen—Paper’s Bukkit API doesn’t let a plugin add controls to that screen.

The plugin can instead open a clickable custom enchant menu when you use an enchanting table with a mace, or provide a custom enchanting-table-style GUI. That’s the closest option without relying on fragile server internals.

_oliwierek_

add whe nyou enchant a mace and the gui pops out add a vanilla mace enchants also not only custom ones

Kodari AI
KodariOct 24 at 6:19 pm 2

I’ll add the enchanting table’s three vanilla offers to the existing menu, keep the custom choices, and apply either choice to the mace returned to the player when the table closes.

The menu now includes the vanilla enchantment offers from the enchanting table alongside the custom mace enchants. Clicking a vanilla offer applies it to the mace; custom enchant choices still work as before.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
7 824
src/main/java/com/kodari/maceenchants/MaceEnchantsPlugin.java
package com.kodari.maceenchants;

import com.kodari.maceenchants.command.MaceEnchantCommand;
import com.kodari.maceenchants.enchant.EnchantService;
import com.kodari.maceenchants.listener.MaceEnchantListener;
import org.bukkit.Bukkit;
import org.bukkit.plugin.java.JavaPlugin;

public final class MaceEnchantsPlugin extends JavaPlugin {
    @Override
    public void onEnable() {
        EnchantService enchantService = new EnchantService(this);
        Bukkit.getPluginManager().registerEvents(new MaceEnchantListener(this, enchantService), this);

        MaceEnchantCommand command = new MaceEnchantCommand(enchantService);
        getCommand("maceenchants").setExecutor(command);
        getCommand("maceenchants").setTabCompleter(command);
    }
}