HudsonAI-77

make legendary weapons mod with weapons like the warden sword and the wither axe, add 12 legendary weapons all with their own crafting recipes

Kodari AI
KodariJan 7 at 1:20 am 19,191 (v2)

Iโ€™ll create a legendary weapons plugin with 12 unique weapons, each with custom abilities and crafting recipes.

LegendaryWeapons
A powerful weapons system featuring 12 unique legendary weapons including the Warden Sword, Wither Axe, Dragon Blade, and more. Each weapon has special abilities like sonic booms, wither effects, lightning strikes, and teleportation. All weapons feature custom crafting recipes with rare materials, particle effects, and balanced combat mechanics. Includes configuration options for damage, cooldowns, and ability customization.

Project created! LegendaryWeapons features 12 unique legendary weapons:

  1. Warden Sword - Sonic boom attacks that pierce enemies

  2. Wither Axe - Inflicts wither effect on nearby enemies

  3. Dragon Blade - Fire damage + temporary flight ability

  4. Frostbite Scythe - Freezes enemies with frost nova

  5. Thunder Hammer - Calls down lightning strikes

  6. Void Reaper - Teleportation + invisibility

  7. Phoenix Staff - Heals allies and grants regeneration

  8. Ocean Trident - Water breathing + riptide boost

  9. Earthquake Gauntlet - Massive ground slam AOE

  10. Soul Dagger - Life steal passive + speed boost

  11. Natureโ€™s Bow - Poison arrow volley with thorn damage

  12. Inferno Mace - Explosive fire attacks

Each weapon has custom crafting recipes using rare materials, configurable damage/cooldowns, particle effects, and unique abilities activated by right-clicking!

HudsonAI-77

make the inferno mace an actual mace. Also have it so all the weapons have sharpness 5

Kodari AI
KodariJan 7 at 1:34 am 12,867 (v2)

Iโ€™ll help you make the inferno mace an actual mace and add Sharpness 5 to all weapons. Let me first check the current implementation.

Now Iโ€™ll update the WeaponManager to:

  1. Change Inferno Mace from NETHERITE_AXE to MACE (the actual mace item added in 1.21)

  2. Add Sharpness 5 to all weapons

Done! Iโ€™ve made the following changes:

  1. Inferno Mace is now an actual MACE - Changed from XMaterial.NETHERITE_AXE to XMaterial.MACE (the mace item added in Minecraft 1.21)

  2. All weapons now have Sharpness 5 - Added XEnchantment.matchXEnchantment("SHARPNESS").ifPresent(xe -> meta.addEnchant(xe.getEnchant(), 5, true)); to the createWeapon() method

  3. Updated the Inferno Mace recipe - Changed the recipe ingredient from NETHERITE_AXE to MACE

All weapons will now have both Sharpness 5 and Unbreaking 10 enchantments, and the Inferno Mace will properly use the mace item type.

HudsonAI-77

Also, add a command that opens a INVENTORY GUI to view all the crafting recipes for the legendary weapons. make it so you can use the command without being an operator

Kodari AI
KodariJan 7 at 1:37 am 20,199 (v2)

Iโ€™ll add an inventory GUI system to view crafting recipes for legendary weapons. Let me first check the existing code structure.

Plan:

  • Create GUI framework (InventoryHandler, InventoryButton, InventoryGUI, GUIManager, GUIListener)

  • Create RecipesGUI implementation showing all weapon recipes

  • Add /recipes command (no permission required)

  • Register GUI system in main plugin class

  • Update plugin.yml with new command

Done! Iโ€™ve added a complete inventory GUI system to view all legendary weapon crafting recipes:

New Features:

  • /recipes command (aliases: /lwrecipes, /weaponrecipes) - No permission required, anyone can use it

  • Interactive GUI showing all 12 legendary weapons with their crafting recipes

  • Click on any weapon to see details

  • Close button at the bottom

Files Created:

  1. GUI Framework (6 files):

    • InventoryHandler.java - Interface for inventory events

    • InventoryButton.java - Button builder with click handlers

    • InventoryGUI.java - Abstract base class for all GUIs

    • GUIManager.java - Manages active inventories

    • GUIListener.java - Listens to inventory events

    • RecipesGUI.java - Implementation showing weapon recipes

  2. Command:

    • RecipesCommand.java - Opens the recipes GUI

Updated Files:

  • LegendaryWeapons.java - Added GUIManager initialization and registration

  • plugin.yml - Added /recipes command (no permission required)

  • config.yml - Added new messages for GUI

The GUI displays all weapons in a 54-slot chest inventory with their full crafting recipes listed in the lore. Players can click any weapon to see details, and use the barrier block at the bottom to close the menu.

HudsonAI-77

Add a command that once you have all the materials for the weapon you can then do

Kodari AI
KodariJan 7 at 1:42 am 12,802 (v2)

Iโ€™ll add a command to craft a weapon if you have all the required materials. Let me first read the relevant files to understand the weapon system and materials.

Now Iโ€™ll create a craft command that checks if the player has all required materials and crafts the weapon if they do.

Iโ€™ve added a /craftweapon <weapon> command that:

  1. Checks if you have all required materials - Scans your inventory for the exact materials needed

  2. Shows missing materials - If you donโ€™t have everything, it lists what youโ€™re missing

  3. Removes materials and gives weapon - If you have all materials, it removes them from your inventory and gives you the crafted weapon

  4. Permission-based - Requires legendaryweapons.craft.<weapon> or legendaryweapons.craft.*

  5. Tab completion - Auto-completes weapon names

Usage:

  • /craftweapon warden_sword - Craft Warden Sword if you have all materials

  • /craftweapon dragon_blade - Craft Dragon Blade if you have all materials

The command will tell you exactly what materials youโ€™re missing if you donโ€™t have everything needed!

HudsonAI-77

The compilation failed with this error:

code
Validation failed for compilation: Compilation failed with 3 error(s):

ERROR in src/main/java/com/legendaryweapons/commands/CraftWeaponCommand.java at line 181: cannot find symbol
            XMaterial.matchXMaterial(item).ifPresent(xMat -> {
                                          ^
  symbol: method ifPresent((xMat)->{ [...]{ } })
  location: class XMaterial

ERROR in src/main/java/com/legendaryweapons/commands/CraftWeaponCommand.java at line 186: cannot find symbol
            if (XMaterial.matchXMaterial(item).orElse(null) == material) {
                                              ^
  symbol: method orElse(<null>)
  location: class XMaterial

ERROR in src/main/java/com/legendaryweapons/commands/CraftWeaponCommand.java at line 202: cannot find symbol
                if (XMaterial.matchXMaterial(item).orElse(null) == material) {
                                                  ^
  symbol: method orElse(<null>)
  location: class XMaterial


=== COMPILATION ERROR ANALYSIS ===

MISSING METHODS:
  - ifPresent((xMat)->{ [...]{ } })
  - orElse(<null>)
ACTION: Check method names and signatures

FILES TO INVESTIGATE:
  - src/main/java/com/legendaryweapons/commands/CraftWeaponCommand.java
 exceeds maximum 

Please fix this error by creating a new artifact with the corrected code.

HudsonAI-77

The compilation failed with this error:

code
Validation failed for compilation: Compilation failed with 3 error(s):

ERROR in src/main/java/com/legendaryweapons/commands/CraftWeaponCommand.java at line 181: cannot find symbol
            XMaterial.matchXMaterial(item).ifPresent(xMat -> {
                                          ^
  symbol: method ifPresent((xMat)->{ [...]{ } })
  location: class XMaterial

ERROR in src/main/java/com/legendaryweapons/commands/CraftWeaponCommand.java at line 186: cannot find symbol
            if (XMaterial.matchXMaterial(item).orElse(null) == material) {
                                              ^
  symbol: method orElse(<null>)
  location: class XMaterial

ERROR in src/main/java/com/legendaryweapons/commands/CraftWeaponCommand.java at line 202: cannot find symbol
                if (XMaterial.matchXMaterial(item).orElse(null) == material) {
                                                  ^
  symbol: method orElse(<null>)
  location: class XMaterial


=== COMPILATION ERROR ANALYSIS ===

MISSING METHODS:
  - ifPresent((xMat)->{ [...]{ } })
  - orElse(<null>)
ACTION: Check method names and signatures

FILES TO INVESTIGATE:
  - src/main/java/com/legendaryweapons/commands/CraftWeaponCommand.java
 exceeds maximum 

Please fix this error by creating a new artifact with the corrected code.

HudsonAI-77

Instead of crafting recipes, make it so that if you do /shop, you can buy the different weapons in a INVENTORY GUI using a currency called tokens, which you get through kills. Make it so that each weapon is worth 50 tokens

HudsonAI-77

remove all enchants from the weapons

Kodari AI
KodariFeb 11 at 12:46 am 12,613 (v2)

Iโ€™ll remove all enchantments from the weapons. Let me first check where the enchantments are defined and applied.

I found the enchantments in the WeaponManager.java file. All weapons are getting Sharpness V and Unbreaking X. Iโ€™ll remove those enchantment lines.

All enchantments removed from the legendary weapons. The weapons will now have no Sharpness or Unbreaking enchantments.

HudsonAI-77

The compilation failed with this error:

code
Validation failed for compilation: Compilation failed with 3 error(s):

ERROR in src/main/java/com/legendaryweapons/commands/CraftWeaponCommand.java at line 181: cannot find symbol
            XMaterial.matchXMaterial(item).ifPresent(xMat -> {
                                          ^
  symbol: method ifPresent((xMat)->{ [...]{ } })
  location: class XMaterial

ERROR in src/main/java/com/legendaryweapons/commands/CraftWeaponCommand.java at line 186: cannot find symbol
            if (XMaterial.matchXMaterial(item).orElse(null) == material) {
                                              ^
  symbol: method orElse(<null>)
  location: class XMaterial

ERROR in src/main/java/com/legendaryweapons/commands/CraftWeaponCommand.java at line 202: cannot find symbol
                if (XMaterial.matchXMaterial(item).orElse(null) == material) {
                                                  ^
  symbol: method orElse(<null>)
  location: class XMaterial


=== COMPILATION ERROR ANALYSIS ===

MISSING METHODS:
  - ifPresent((xMat)->{ [...]{ } })
  - orElse(<null>)
ACTION: Check method names and signatures

FILES TO INVESTIGATE:
  - src/main/java/com/legendaryweapons/commands/CraftWeaponCommand.java
 exceeds maximum 

Please fix this error by creating a new artifact with the corrected code.

HudsonAI-77

Make it so I can configure all the cooldowns in the config between 10 seconds and 200 seconds. Make all weapons do as much damage as a sharpness 5 netherite sword. make the frost bite scythe actually freeze the player in place for 7 seconds. make the Warden Swords sonic boom attack do 4 hearts of true damage through armour. Make the Soul Dagger heal 2 hearts your health every 7 hits you do to an entity. make the Inferno Mace do as much damage as a mace with the enchantment density 5 and also make the inferno maces fire attack launch a fire ball that does 4 hearts of damage. also make the thunder hammers lightning strike do 3 hearts of damage through armour.

Kodari AI
KodariFeb 17 at 12:38 am 18,911 (v2)

Iโ€™ll read all relevant files first to understand the current implementation.

I need to implement several ability changes. Let me update the config and the ability listener.

All weapon abilities have been updated with the requested changes:

  • All weapons now deal 11 damage (same as Sharpness 5 Netherite Sword), except Inferno Mace which deals 16 damage to match a density mace

  • Frostbite Scythe now completely freezes players in place for 7 seconds (140 ticks) using max slowness and negative jump boost

  • Warden Swordโ€™s sonic boom now deals 4 hearts (8 damage) of true damage through armor

  • Soul Dagger now heals 2 hearts (4 HP) every 7 hits to entities with hit tracking

  • Inferno Mace now launches a fireball that deals 4 hearts (8 damage) of true damage on impact

  • Thunder Hammerโ€™s lightning strike now deals 3 hearts (6 damage) of true damage through armor

  • All cooldowns are configurable between 10-200 seconds in the config

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
19 1,764
src/main/java/com/legendaryweapons/LegendaryWeapons.java
package com.legendaryweapons;

import com.legendaryweapons.commands.CraftWeaponCommand;
import com.legendaryweapons.commands.GiveWeaponCommand;
import com.legendaryweapons.commands.MainCommand;
import com.legendaryweapons.commands.RecipesCommand;
import com.legendaryweapons.inventory.gui.GUIListener;
import com.legendaryweapons.inventory.gui.GUIManager;
import com.legendaryweapons.listeners.WeaponAbilityListener;
import com.legendaryweapons.listeners.WeaponCraftListener;
import com.legendaryweapons.managers.CooldownManager;
import com.legendaryweapons.managers.WeaponManager;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class LegendaryWeapons extends JavaPlugin {
    
    private WeaponManager weaponManager;
    private CooldownManager cooldownManager;
    private GUIManager guiManager;
    
    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.cooldownManager = new CooldownManager();
        this.weaponManager = new WeaponManager(this);
        this.guiManager = new GUIManager();
        
        registerCommands();
        registerListeners();
        registerRecipes();
        
        getLogger().info("LegendaryWeapons has been enabled!");
    }
    
    @Override
    public void onDisable() {
        getLogger().info("LegendaryWeapons has been disabled!");
    }
    
    private void registerCommands() {
        getCommand("legendaryweapons").setExecutor(new MainCommand(this));
        getCommand("giveweapon").setExecutor(new GiveWeaponCommand(this));
        getCommand("recipes").setExecutor(new RecipesCommand(this));
        getCommand("craftweapon").setExecutor(new CraftWeaponCommand(this));
    }
    
    private void registerListeners() {
        getServer().getPluginManager().registerEvents(new WeaponAbilityListener(this), this);
        getServer().getPluginManager().registerEvents(new WeaponCraftListener(this), this);
        getServer().getPluginManager().registerEvents(new GUIListener(guiManager), this);
    }
    
    private void registerRecipes() {
        weaponManager.registerAllRecipes();
    }
    
    public String getMessage(String path) {
        String prefix = getConfig().getString("messages.prefix", "&6[&eLegendary&6] &r");
        String message = getConfig().getString("messages." + path, "");
        return org.bukkit.ChatColor.translateAlternateColorCodes('&', prefix + message);
    }
}