whatthebroskui

create a mod that makes a more complicated recepie for the mace and limits it to 1 mace in a server

Kodari AI
KodariApr 17 at 10:05 pm 12,356 (v2)

I’ll create a plugin that makes the mace a truly legendary item with a complex recipe and server-wide uniqueness.

LegendaryMace
A plugin that adds a unique, craftable Legendary Mace to your server with a custom expensive recipe. Only one mace can exist at a time, making it a truly legendary item. Features include configurable crafting recipe requiring diamond blocks, netherite ingots, and a nether star, owner tracking, and admin commands to manage the mace's existence. Perfect for servers wanting a rare, prestigious item that players must compete for.

I’ll create a plugin with:

  • Custom expensive recipe for the mace (4 diamond blocks + 4 netherite ingots + 1 nether star)

  • Server-wide limit of 1 mace

  • Tracking system to prevent duplicate crafting

  • Admin commands to check status and reset if needed

Created LegendaryMace plugin with custom expensive recipe (4 diamond blocks + 4 netherite ingots + 1 nether star) and server-wide limit of 1 mace. Features include owner tracking, crafting prevention, admin commands, and XSeries cross-version compatibility.

whatthebroskui

can you make it include a heavy core and a breeze rod in the recepie

Kodari AI
KodariApr 17 at 10:06 pm 2,567 (v2)

I’ll update the recipe to include heavy core and breeze rod, making it even more thematic for the mace!

Updated the mace recipe to require 2 heavy cores, 1 breeze rod, 2 netherite ingots, 1 nether star, and 3 diamond blocks - a truly legendary recipe!

whatthebroskui

can you also make it so it is max enchanted when crafted and upon death anounces in chat the coordintes

Kodari AI
KodariApr 17 at 10:08 pm 10,725 (v2)

I’ll add max enchantments to the crafted mace and create a death announcement system with coordinates.

Done! The Legendary Mace now:

  • Comes with max enchantments (Sharpness V, Unbreaking III, Mending, Fire Aspect II, Looting III)

  • Announces death coordinates in chat when the owner dies with the mace

  • Updated recipe includes 2 heavy cores and 1 breeze rod as requested

whatthebroskui

can you also make it so the end and nether is disabled at the start of the server but people with op are able to change each one speratly

Kodari AI
KodariApr 17 at 10:10 pm 8,683 (v2)

I’ll add dimension control to disable the End and Nether, with commands for OPs to toggle each one separately.

Done! Added dimension control system with:

  • Nether and End disabled by default at server start

  • /dimension command for OPs to toggle each dimension separately (/dimension nether enable, /dimension end disable, etc.)

  • Players without OP permission cannot access disabled dimensions (portals blocked, teleports blocked)

  • OPs always have access regardless of dimension status

  • Status persists across server restarts

whatthebroskui

give the mace enchantments

1 image attached
Kodari AI
KodariApr 17 at 10:12 pm 4,346 (v2)

I’ll update the mace enchantments to match the image exactly.

Updated the Legendary Mace to have the exact enchantments from your image: Sharpness V, Smite V, Bane of Arthropods V, Unbreaking III, Mending, Wind Burst III, Density V, and Breach IV!

whatthebroskui

also put a cooldown for 30 seconds on the mace even if you miss

Kodari AI
KodariApr 17 at 10:14 pm 13,389 (v2)

I’ll add a 30-second cooldown system for the mace that activates on every attack.

Added a 30-second cooldown system for the Legendary Mace that triggers on every attack attempt, even if you miss. The cooldown is tracked per player and displays remaining time when on cooldown.

whatthebroskui

can you also do a thing where operaters can disable and enable each armour when they want with comands start the server without any enabled

Kodari AI
KodariApr 17 at 10:16 pm 10,930 (v2)

I’ll add an armor control system where OPs can disable/enable each armor piece separately, with all armor disabled by default.

Done! Added armor control system where:

  • All armor pieces (helmet, chestplate, leggings, boots) are disabled by default

  • OPs can toggle each armor piece separately with /armor <type> <enable|disable>

  • Non-OP players cannot equip disabled armor

  • Status persists across server restarts

  • OPs bypass armor restrictions

whatthebroskui

add a king title nesxt the player who has the mace and make sure the only way it can be obtained is by crafting it first or killing the person . so the person with the mace cannot put it in ender chest or any containers

Kodari AI
KodariApr 17 at 10:19 pm 11,840 (v2)

I’ll add a king title system and restrictions to prevent the mace from being stored in containers.

Done! Added a king title system and container restrictions:

King Title System:

  • The mace owner gets a gold crown (👑) prefix next to their name

  • Title automatically updates when ownership changes (crafting or killing)

  • Title persists across server restarts and player rejoins

Container Restrictions:

  • Mace cannot be placed in chests, ender chests, hoppers, barrels, shulker boxes, etc.

  • Players must keep the mace in their inventory

  • Only way to obtain the mace is by crafting it first or killing the current owner

whatthebroskui

how do i put this into a server

Kodari AI
KodariApr 17 at 10:24 pm 1,165 (v2)

Here’s how to put this plugin on your server:

Step 1: Build the Plugin

Open a terminal/command prompt in the project directory and run:

Shell
./gradlew build

(On Windows: gradlew.bat build)

This creates a JAR file at: build/libs/LegendaryMace-1.0.jar

Step 2: Install on Server

  1. Copy the JAR file to your server’s plugins/ folder

  2. Start or restart your server

  3. The plugin will generate plugins/LegendaryMace/config.yml on first run

Step 3: Verify Installation

Once the server is running:

  • Type /plugins - you should see LegendaryMace in green

  • The config file will be created automatically with default settings

What’s Included:

Commands (OP only):

  • /mace give <player> - Give legendary mace

  • /dimension <nether|end> <enable|disable> - Control dimensions

  • /armor <helmet|chestplate|leggings|boots> <enable|disable> - Control armor

Default Settings:

  • ✅ Nether & End: DISABLED (OPs can enable)

  • ✅ All armor: DISABLED (OPs can enable)

  • ✅ Mace cooldown: 30 seconds

  • ✅ King title: 👑 [prefix]

  • ✅ Death coordinates broadcast: Enabled

Recipe: Craft the mace with 2 Heavy Cores + 1 Breeze Rod in any pattern

That’s it! The plugin is ready to use.

whatthebroskui

for the armour i meant type for example copper iron etc

Kodari AI
KodariApr 17 at 10:27 pm 33,721 (v2)

I’ll update the armor system to control armor by material type (copper, iron, diamond, etc.) instead of by piece.

Done! Updated the armor system to control by material type (leather, chainmail, iron, gold, diamond, netherite) instead of by piece. Use /armor <type> <enable|disable> to control each armor type separately. All armor types are disabled by default.

whatthebroskui

can they be crafted and just cant be worn or they cant be crafted

Kodari AI
KodariApr 17 at 10:27 pm 766 (v2)

Currently, armor can be crafted but cannot be worn if it’s disabled. The ArmorListener only prevents equipping disabled armor types.

Do you want me to also prevent crafting of disabled armor types? So if iron armor is disabled, players can’t craft iron helmets, chestplates, leggings, or boots at all?

whatthebroskui

no thats fine

Kodari AI
KodariApr 17 at 10:27 pm 736 (v2)

Got it! The armor system will stay as is - players can craft any armor type, but they cannot wear disabled armor types. OPs can control which armor materials are wearable with /armor <type> <enable|disable>.

whatthebroskui

how to craft mace

Kodari AI
KodariApr 17 at 10:52 pm 7,606 (v2)

Legendary Mace Crafting Recipe

Place items in a crafting table in this pattern:

Plain Text
[Heavy Core] [Breeze Rod] [Heavy Core]
[Netherite Ingot] [Nether Star] [Netherite Ingot]
[Diamond Block] [Diamond Block] [Diamond Block]

Required Materials:

  • 2x Heavy Core

  • 1x Breeze Rod

  • 2x Netherite Ingot

  • 1x Nether Star

  • 3x Diamond Block

Result: A fully enchanted Legendary Mace with:

  • Sharpness V

  • Smite V

  • Bane of Arthropods V

  • Unbreaking III

  • Mending I

  • Wind Burst III

  • Density V

  • Breach IV

Important:

  • Only ONE mace can exist on the server at a time

  • The crafter becomes the “King” with a crown (👑) prefix

  • The mace cannot be placed in any containers

  • Can only be obtained by crafting first or killing the current owner

whatthebroskui

the armour thing should still apply to operaters when disabled also the mace cooldown i want to change it to apply the cooldown only after attacks aswell as the nether should be do also reduce mace cooldown to 15 seconds and make a sound that will allow them to understand that its on cooldown if they dont look in chat when they try use it while on cooldown

Kodari AI
KodariApr 17 at 11:06 pm 8,533 (v2)

I’ll update the plugin so armor restrictions apply to OPs, cooldown only triggers after attacks, nether is enabled by default, cooldown is 15 seconds, and add a sound for cooldown attempts.

Done! Updated all systems:

  • Armor restrictions now apply to OPs - no one can wear disabled armor

  • Mace cooldown only triggers after attacks - cooldown starts when hitting entities, not on right-click

  • Nether is now enabled by default - players can access it from the start

  • Cooldown reduced to 15 seconds (from 30)

  • Sound plays when trying to use mace on cooldown - villager “no” sound alerts players without needing to check chat

whatthebroskui

also the nether and end are still restricted to ops aswell

Kodari AI
KodariApr 17 at 11:07 pm 4,908 (v2)

I’ll update the dimension restrictions to apply to OPs as well.

Done! Dimension restrictions (nether and end) now apply to everyone including OPs. No one can bypass the restrictions when dimensions are disabled.

whatthebroskui

can you also add anti xray

Kodari AI
KodariApr 17 at 11:13 pm 17,085 (v2)

I’ll add an anti-xray system to the plugin. Let me read the current files first to understand the structure.

I’ll add a complete anti-xray system that works with Paper’s built-in anti-xray engine.

Done! Added a complete anti-xray system with Paper’s built-in engine support. Use /xray <enable|disable> <engine1|engine2> to control it. Engine2 (obfuscation) is enabled by default and hides all valuable ores. Server restart required after changing settings.

whatthebroskui

the thing is red what dose that mean when i do / plugins its red

whatthebroskui

Paper plugin error:

NullPointerException: getCommand(...) is null (onEnable line 70)

plugin.yml commands: mace, dimension, armor

Fix onEnable():

* match command names exactly * add null checks * no new commands

Output only fixed method.

whatthebroskui

Paper plugin error:

NullPointerException: getCommand(...) is null (onEnable line 70)

plugin.yml commands: mace, dimension, armor

Fix onEnable():

* match command names exactly * add null checks * no new commands

Output only fixed method.

whatthebroskui

Fix onEnable():

getCommand null

commands: mace, dimension, armor

match names, add null checks

only code

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
24 1,897
src/main/java/com/legendarymace/LegendaryMace.java
package com.legendarymace;

import com.legendarymace.command.ArmorCommand;
import com.legendarymace.command.DimensionCommand;
import com.legendarymace.command.MaceCommand;
import com.legendarymace.command.XrayCommand;
import com.legendarymace.listener.ArmorListener;
import com.legendarymace.listener.ContainerListener;
import com.legendarymace.listener.CraftListener;
import com.legendarymace.listener.DeathListener;
import com.legendarymace.listener.DimensionListener;
import com.legendarymace.listener.JoinListener;
import com.legendarymace.listener.MaceAttackListener;
import com.legendarymace.manager.AntiXrayManager;
import com.legendarymace.manager.ArmorManager;
import com.legendarymace.manager.ConfigManager;
import com.legendarymace.manager.CooldownManager;
import com.legendarymace.manager.DimensionManager;
import com.legendarymace.manager.KingTitleManager;
import com.legendarymace.manager.MaceTracker;
import com.legendarymace.manager.RecipeManager;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class LegendaryMace extends JavaPlugin {
    private ConfigManager configManager;
    private MaceTracker maceTracker;
    private RecipeManager recipeManager;
    private DimensionManager dimensionManager;
    private CooldownManager cooldownManager;
    private ArmorManager armorManager;
    private KingTitleManager kingTitleManager;
    private AntiXrayManager antiXrayManager;

    @Override
    public void onEnable() {
        this.configManager = new ConfigManager(this);
        this.maceTracker = new MaceTracker(this);
        this.recipeManager = new RecipeManager(this);
        this.dimensionManager = new DimensionManager(this);
        this.cooldownManager = new CooldownManager(this);
        this.armorManager = new ArmorManager(this);
        this.kingTitleManager = new KingTitleManager(this);
        this.antiXrayManager = new AntiXrayManager(this);

        recipeManager.registerMaceRecipe();

        getServer().getPluginManager().registerEvents(new CraftListener(this), this);
        getServer().getPluginManager().registerEvents(new DeathListener(this), this);
        getServer().getPluginManager().registerEvents(new DimensionListener(this), this);
        getServer().getPluginManager().registerEvents(new MaceAttackListener(this), this);
        getServer().getPluginManager().registerEvents(new ArmorListener(this), this);
        getServer().getPluginManager().registerEvents(new ContainerListener(this), this);
        getServer().getPluginManager().registerEvents(new JoinListener(this), this);

        MaceCommand maceCommand = new MaceCommand(this);
        getCommand("mace").setExecutor(maceCommand);
        getCommand("mace").setTabCompleter(maceCommand);

        DimensionCommand dimensionCommand = new DimensionCommand(this);
        getCommand("dimension").setExecutor(dimensionCommand);
        getCommand("dimension").setTabCompleter(dimensionCommand);

        ArmorCommand armorCommand = new ArmorCommand(this);
        getCommand("armor").setExecutor(armorCommand);
        getCommand("armor").setTabCompleter(armorCommand);

        XrayCommand xrayCommand = new XrayCommand(this);
        getCommand("xray").setExecutor(xrayCommand);
        getCommand("xray").setTabCompleter(xrayCommand);

        getLogger().info("LegendaryMace has been enabled!");
        getLogger().info("Mace exists: " + maceTracker.isMaceExists());
        getLogger().info("Nether: " + (dimensionManager.isNetherEnabled() ? "Enabled" : "Disabled"));
        getLogger().info("End: " + (dimensionManager.isEndEnabled() ? "Enabled" : "Disabled"));
        getLogger().info("Leather Armor: " + (armorManager.isArmorTypeEnabled("leather") ? "Enabled" : "Disabled"));
        getLogger().info("Chainmail Armor: " + (armorManager.isArmorTypeEnabled("chainmail") ? "Enabled" : "Disabled"));
        getLogger().info("Iron Armor: " + (armorManager.isArmorTypeEnabled("iron") ? "Enabled" : "Disabled"));
        getLogger().info("Gold Armor: " + (armorManager.isArmorTypeEnabled("gold") ? "Enabled" : "Disabled"));
        getLogger().info("Diamond Armor: " + (armorManager.isArmorTypeEnabled("diamond") ? "Enabled" : "Disabled"));
        getLogger().info("Netherite Armor: " + (armorManager.isArmorTypeEnabled("netherite") ? "Enabled" : "Disabled"));
        getLogger().info("Anti-Xray: " + (antiXrayManager.isEnabled() ? "Enabled (" + antiXrayManager.getMode().toUpperCase() + ")" : "Disabled"));
        
        antiXrayManager.applyAntiXray();
        kingTitleManager.refreshKingTitle();
    }

    @Override
    public void onDisable() {
        if (maceTracker != null) {
            maceTracker.save();
        }
        if (dimensionManager != null) {
            dimensionManager.save();
        }
        if (armorManager != null) {
            armorManager.save();
        }
        if (antiXrayManager != null) {
            antiXrayManager.save();
        }
        getLogger().info("LegendaryMace has been disabled!");
    }
}