notviksu

Create a Minecraft Paper plugin named "WindMace" for Paper 1.21.11 and Java 21.

Create a custom item called "Wind Mace" based on the provided reference image.

Item:

  • Material: MACE
  • Custom Name: Wind Mace
  • Unbreakable
  • Attack Damage: 6
  • Attack Speed: 0.6
  • Custom Enchantments:

- Wind Burst II - Density V

Ability: Air Dash

  • Activate by right-clicking with the custom Wind Mace.
  • Launch the player forward and slightly upward.
  • Add wind particles and sound effects.
  • Prevent fall damage caused by Air Dash.
  • Cooldown: 10 seconds.

The custom Wind Mace must be identified using PDC, not only its name or lore.

Commands:

  • /windmace give <player>
  • /windmace reload
  • /wind

Configuration:

  • config.yml
  • messages.yml

Make the item name, lore, enchantments, ability, cooldown, damage, attack speed, particles, sounds, and messages fully configurable.

Use modern Paper 1.21.11 API and Java 21. Create clean, modular, optimized, production-ready code with complete working source code, plugin.yml, config.yml, messages.yml, and no compilation errors.

Kodari AI
KodariJul 25 at 5:45 am 2

I’ll create the WindMace plugin — a custom wind-infused mace with Air Dash ability, fully configurable.

WindMace
A Paper 1.21.11 plugin adding a custom Wind Mace item with Air Dash ability. Features include custom attributes (6 damage, 0.6 speed), Wind Burst II and Density V enchantments, right-click Air Dash with wind particles and sounds, fall damage prevention, 10-second cooldown, PDC-based item identification, and fully configurable items, abilities, particles, sounds, and messages through config.yml and messages.yml.

Let me plan the architecture:

  1. WindMace — main plugin class, initializes components

  2. ConfigManager — loads config.yml, typed getters

  3. MessageManager — loads messages.yml, color formatting, placeholders

  4. WindMaceItem — creates custom item with PDC, checks item identity

  5. AirDashAbility — dash logic, cooldown, particles, sounds

  6. WindMaceListener — right-click activation, fall damage prevention, quit cleanup

  7. WindMaceCommand — /windmace give <player>, /windmace reload

  8. WindCommand — /wind gives self the item

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
13 788
src/main/java/com/windmace/WindMace.java
package com.windmace;

import com.windmace.ability.AirDashAbility;
import com.windmace.command.WindCommand;
import com.windmace.command.WindMaceCommand;
import com.windmace.config.ConfigManager;
import com.windmace.config.MessageManager;
import com.windmace.item.WindMaceItem;
import com.windmace.listener.WindMaceListener;
import org.bukkit.plugin.java.JavaPlugin;

public class WindMace extends JavaPlugin {

    private ConfigManager configManager;
    private MessageManager messageManager;
    private WindMaceItem windMaceItem;
    private AirDashAbility airDashAbility;
    private WindMaceListener listener;

    @Override
    public void onEnable() {
        // ── Managers ──
        configManager = new ConfigManager(this);
        messageManager = new MessageManager(this);

        // ── Core components ──
        windMaceItem = new WindMaceItem(this);
        airDashAbility = new AirDashAbility(this);
        listener = new WindMaceListener(this);

        // ── Events ──
        getServer().getPluginManager().registerEvents(listener, this);

        // ── Commands ──
        WindMaceCommand mainCmd = new WindMaceCommand(this);
        getCommand("windmace").setExecutor(mainCmd);
        getCommand("windmace").setTabCompleter(mainCmd);
        getCommand("wind").setExecutor(new WindCommand(this));

        getLogger().info("WindMace enabled — the winds are yours to command!");
    }

    @Override
    public void onDisable() {
        getLogger().info("WindMace disabled.");
    }

    // ── Getters for components ──

    public ConfigManager getConfigManager() {
        return configManager;
    }

    public MessageManager getMessageManager() {
        return messageManager;
    }

    public WindMaceItem getWindMaceItem() {
        return windMaceItem;
    }

    public AirDashAbility getAirDashAbility() {
        return airDashAbility;
    }

    public WindMaceListener getListener() {
        return listener;
    }
}