Jefry Atencio

Create a new Minecraft weapon. Appearance: An enormous, heavy mace imbued with pure evil; Despite its immense weight, its wielder can swing it as if it were as light as air—granting it incredible speed. Its colors range from red, black, and violet to white, pink, green, and light blue, depending entirely on the wielder. The weapon possesses unique abilities with special effects. Upon first acquiring the mace, the wielder may choose its color—a choice that can signify different personality traits and distinct abilities.. Behavior: The mace is used for combat; it features heavy, powerful strikes and is extremely fast.

Skills can be used with keys of your choice in the settings

Kodari AI
KodariNov 12 at 10:15 pm 1
VoidMace
A custom Minecraft weapon plugin featuring an enormous, lightweight mace imbued with evil power. Players choose from seven color variants (red, black, violet, white, pink, green, light blue) upon first acquisition, each granting distinct combat abilities and personality-themed skills. The mace delivers heavy, powerful strikes at incredible speed despite its massive appearance. Includes configurable keybind-based skill activation, unique particle effects per color, special ability cooldowns, and full customization through settings. Designed for PvP and PvE combat scenarios with visually striking effects matching each color's theme.

Custom skill keybinds in Minecraft’s settings require a client mod, rather than this Java plugin project. Kodari supports Fabric mods for 26.3, 26.2, 1.21.11, 1.21.4, 1.20.4, 1.19.4, and 1.18.2. Which version would you like?

Jefry Atencio

1.20.4, neoforge or forge

Kodari AI
KodariNov 12 at 10:18 pm 1

This is a Java server plugin project. Kodari doesn’t support Forge or NeoForge for Minecraft 1.20.4; the closest options are Fabric for 1.20.4 and NeoForge for 1.21.1.

Jefry Atencio

well, make all the mod, later i tell u wt i want to fix

Kodari AI
KodariNov 12 at 10:19 pm 1

Kodari doesn’t support Forge or NeoForge for Minecraft 1.20.4. The closest options are Fabric 1.20.4 and NeoForge 1.21.1. Which would you like?

Jefry Atencio

yes just do what do you can

Kodari AI
KodariNov 12 at 10:20 pm 2
  • Create a powerful, fast mace with seven wielder-chosen colors and distinct abilities.

  • Use configurable click controls and cooldowns, since server plugins cannot add Minecraft settings keybinds.

Created the server-plugin version of the evil mace. Use /evilmace to choose one of seven colors; each has a distinct ability. Damage, cooldown, radius, and click control are configurable in config.yml.

The mace currently uses a netherite axe as its appearance. Custom keybinds and a custom 3D model aren’t included. To enable model creation in Kodari Studio, open this project’s settings → Generation, or enable it for all projects at https://kodari.ai/settings?tab=features.

Jefry Atencio

give me the source code

Kodari AI
KodariNov 12 at 10:40 pm 1

The source code is in your project files:

  • Java: src/main/java/com/kodari/evilmace/EvilMace.java

  • Plugin declaration: src/main/resources/plugin.yml

  • Settings: src/main/resources/config.yml

  • Build configuration: build.gradle

You can open and copy these files from the project workspace. This is the server-plugin version, not a Forge or NeoForge mod.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
4 254
src/main/java/com/kodari/evilmace/EvilMace.java
package com.kodari.evilmace;

import com.cryptomorin.xseries.XAttribute;
import com.cryptomorin.xseries.XMaterial;
import com.cryptomorin.xseries.XPotion;
import com.cryptomorin.xseries.particles.XParticle;
import org.bukkit.Bukkit;
import org.bukkit.ChatColor;
import org.bukkit.NamespacedKey;
import org.bukkit.attribute.AttributeModifier;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Entity;
import org.bukkit.entity.LivingEntity;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.Action;
import org.bukkit.event.entity.EntityDamageByEntityEvent;
import org.bukkit.event.inventory.InventoryClickEvent;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.inventory.EquipmentSlot;
import org.bukkit.inventory.Inventory;
import org.bukkit.inventory.InventoryHolder;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.persistence.PersistentDataType;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.Arrays;
import java.util.HashMap;
import java.util.Map;
import java.util.UUID;

public final class EvilMace extends JavaPlugin implements Listener {
    private NamespacedKey maceKey;
    private final Map<UUID, Long> cooldowns = new HashMap<>();
    private boolean dealingSkillDamage;

    private enum MaceColor {
        RED("RED_DYE", ChatColor.RED, "Fury", "Ignites nearby foes"),
        BLACK("BLACK_DYE", ChatColor.DARK_GRAY, "Dominion", "Weakens nearby foes"),
        VIOLET("PURPLE_DYE", ChatColor.DARK_PURPLE, "Mystery", "Blinds nearby foes"),
        WHITE("WHITE_DYE", ChatColor.WHITE, "Resolve", "Heals its wielder"),
        PINK("PINK_DYE", ChatColor.LIGHT_PURPLE, "Compassion", "Grants regeneration"),
        GREEN("GREEN_DYE", ChatColor.GREEN, "Ambition", "Poisons nearby foes"),
        LIGHT_BLUE("LIGHT_BLUE_DYE", ChatColor.AQUA, "Freedom", "Grants speed and slows foes");

        final String dye;
        final ChatColor color;
        final String trait;
        final String skill;

        MaceColor(String dye, ChatColor color, String trait, String skill) {
            this.dye = dye;
            this.color = color;
            this.trait = trait;
            this.skill = skill;
        }
    }

    private static final class ChoiceHolder implements InventoryHolder {
        private Inventory inventory;

        @Override
        public Inventory getInventory() {
            return inventory;
        }
    }

    @Override
    public void onEnable() {
        saveDefaultConfig();
        maceKey = new NamespacedKey(this, "mace_color");
        Bukkit.getPluginManager().registerEvents(this, this);
    }

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (!(sender instanceof Player)) {
            sender.sendMessage("Only players can choose a mace.");
            return true;
        }
        Player player = (Player) sender;
        ChoiceHolder holder = new ChoiceHolder();
        holder.inventory = Bukkit.createInventory(holder, 9, "Choose your mace color");
        MaceColor[] colors = MaceColor.values();
        for (int i = 0; i < colors.length; i++) {
            MaceColor color = colors[i];
            ItemStack icon = XMaterial.matchXMaterial(color.dye).map(XMaterial::parseItem).orElse(null);
            if (icon == null) continue;
            ItemMeta meta = icon.getItemMeta();
            meta.setDisplayName(color.color + color.name().replace('_', ' ') + " - " + color.trait);
            meta.setLore(Arrays.asList(ChatColor.GRAY + color.skill, ChatColor.YELLOW + "Click to choose"));
            icon.setItemMeta(meta);
            holder.inventory.setItem(i + 1, icon);
        }
        player.openInventory(holder.inventory);
        return true;
    }

    @EventHandler
    public void onChoice(InventoryClickEvent event) {
        if (!(event.getView().getTopInventory().getHolder() instanceof ChoiceHolder)) return;
        event.setCancelled(true);
        int slot = event.getRawSlot();
        if (slot < 1 || slot > MaceColor.values().length || !(event.getWhoClicked() instanceof Player)) return;
        Player player = (Player) event.getWhoClicked();
        ItemStack mace = createMace(MaceColor.values()[slot - 1]);
        if (mace == null) {
            player.sendMessage(ChatColor.RED + "The mace material is unavailable on this server.");
            player.closeInventory();
            return;
        }
        Map<Integer, ItemStack> leftovers = player.getInventory().addItem(mace);
        leftovers.values().forEach(item -> player.getWorld().dropItemNaturally(player.getLocation(), item));
        player.closeInventory();
        player.sendMessage(ChatColor.DARK_PURPLE + "The evil mace has chosen you.");
    }

    private ItemStack createMace(MaceColor color) {
        ItemStack item = XMaterial.matchXMaterial("NETHERITE_AXE").map(XMaterial::parseItem).orElse(null);
        if (item == null) return null;
        ItemMeta meta = item.getItemMeta();
        meta.setDisplayName(color.color + "Evil Mace of " + color.trait);
        meta.setLore(Arrays.asList(ChatColor.DARK_GRAY + "An impossibly swift weapon of pure evil.",
                ChatColor.GRAY + "Trait: " + color.color + color.trait,
                ChatColor.GRAY + "Skill: " + color.skill));
        meta.getPersistentDataContainer().set(maceKey, PersistentDataType.STRING, color.name());
        XAttribute.of("attack_speed").ifPresent(attribute -> meta.addAttributeModifier(attribute.get(),
                XAttribute.createModifier("evilmace:speed", getConfig().getDouble("attack-speed-bonus", 12.0),
                        AttributeModifier.Operation.ADD_NUMBER, EquipmentSlot.HAND)));
        item.setItemMeta(meta);
        return item;
    }

    private MaceColor getColor(ItemStack item) {
        if (item == null || !item.hasItemMeta()) return null;
        String value = item.getItemMeta().getPersistentDataContainer().get(maceKey, PersistentDataType.STRING);
        if (value == null) return null;
        try {
            return MaceColor.valueOf(value);
        } catch (IllegalArgumentException ignored) {
            return null;
        }
    }

    @EventHandler(ignoreCancelled = true)
    public void onStrike(EntityDamageByEntityEvent event) {
        if (dealingSkillDamage) return;
        if (!(event.getDamager() instanceof Player)) return;
        Player player = (Player) event.getDamager();
        if (getColor(player.getInventory().getItemInMainHand()) == null) return;
        event.setDamage(Math.max(0, getConfig().getDouble("damage", 14.0)));
        XParticle.of("CRIT").ifPresent(p -> event.getEntity().getWorld().spawnParticle(p.get(), event.getEntity().getLocation().add(0, 1, 0), 15));
    }

    @EventHandler(ignoreCancelled = true)
    public void onUse(PlayerInteractEvent event) {
        if (event.getHand() != EquipmentSlot.HAND) return;
        Player player = event.getPlayer();
        MaceColor color = getColor(player.getInventory().getItemInMainHand());
        if (color == null) return;
        String control = getConfig().getString("skill-control", "RIGHT_CLICK");
        Action action = event.getAction();
        boolean right = action == Action.RIGHT_CLICK_AIR || action == Action.RIGHT_CLICK_BLOCK;
        boolean left = action == Action.LEFT_CLICK_AIR || action == Action.LEFT_CLICK_BLOCK;
        boolean selected = "SHIFT_RIGHT_CLICK".equalsIgnoreCase(control) ? right && player.isSneaking()
                : "SHIFT_LEFT_CLICK".equalsIgnoreCase(control) ? left && player.isSneaking()
                : "LEFT_CLICK".equalsIgnoreCase(control) ? left : right;
        if (!selected) return;
        event.setCancelled(true);
        long now = System.currentTimeMillis();
        long until = cooldowns.getOrDefault(player.getUniqueId(), 0L);
        if (until > now) {
            player.sendMessage(ChatColor.RED + "Skill ready in " + ((until - now + 999) / 1000) + "s.");
            return;
        }
        cooldowns.put(player.getUniqueId(), now + Math.max(0, getConfig().getLong("skill-cooldown-seconds", 15)) * 1000L);
        activate(player, color);
    }

    private void activate(Player player, MaceColor color) {
        if (color == MaceColor.WHITE) player.setHealth(Math.min(player.getMaxHealth(), player.getHealth() + 6));
        if (color == MaceColor.PINK) effect(player, "REGENERATION", 120, 1);
        if (color == MaceColor.LIGHT_BLUE) effect(player, "SPEED", 120, 1);
        double radius = Math.max(0, getConfig().getDouble("skill-radius", 5));
        double damage = Math.max(0, getConfig().getDouble("skill-damage", 6));
        for (Entity entity : player.getNearbyEntities(radius, radius, radius)) {
            if (!(entity instanceof LivingEntity) || entity.getLocation().distanceSquared(player.getLocation()) > radius * radius) continue;
            LivingEntity target = (LivingEntity) entity;
            dealingSkillDamage = true;
            try {
                target.damage(damage, player);
            } finally {
                dealingSkillDamage = false;
            }
            switch (color) {
                case RED: target.setFireTicks(80); break;
                case BLACK: effect(target, "WEAKNESS", 100, 1); break;