Masterwings

sword_of_chaos: display_name: Sword of Chaos resource: material: NETHERITE_SWORD model_path: item/weapons/sword_of_chaos durability: max_durability: 4000 attribute_modifiers: mainhand: attackDamage: 8.5 attackSpeed: 1.6 luck: 1.5 make it so when someone rightclicks while holding this sword people in the radius of 8 blocks will get attacked by a evoker fang, make sure it has a 5 second cooldown

Kodari AI
KodariApr 26 at 2:03 pm 7,628 (v2)

I’ll create a custom weapons plugin with the Sword of Chaos ability that spawns evoker fangs in a radius on right-click.

ChaosWeapons
A custom weapons plugin featuring mythical items with unique abilities. The Sword of Chaos unleashes evoker fangs against nearby enemies when right-clicked. Items are fully configurable with custom attributes, durability, and cooldown-based abilities. Supports custom model paths for resource packs and integrates with existing combat mechanics.

Project created! The Sword of Chaos will spawn evoker fangs in a circle around enemies within 8 blocks when right-clicked, with a 5-second cooldown. Use /cw give <player> sword_of_chaos to obtain it.

Masterwings

I meant 15 second cooldown and make the dependency itemsadder

Kodari AI
KodariApr 26 at 2:05 pm 23,595 (v2)

I’ll update the plugin to use ItemsAdder as a dependency and change the cooldown to 15 seconds.

Updated to use ItemsAdder! The cooldown is now 15 seconds. Place the sword_of_chaos.yml file in your ItemsAdder items folder to define the item. The plugin now detects the ItemsAdder item chaosweapons:sword_of_chaos and adds the evoker fang ability when right-clicked.

Masterwings

is the tool id sword_of_chaos ?

Kodari AI
KodariApr 26 at 2:05 pm 2,098 (v2)

Yes, the full ItemsAdder ID is chaosweapons:sword_of_chaos

  • Namespace: chaosweapons

  • Item key: sword_of_chaos

The plugin detects this ID when a player right-clicks with the item.

Kodari can make mistakes. Review important code before using.
Files
itemsadder-example
src
build.gradle
Code
8 286
src/main/java/com/chaosweapons/ChaosWeapons.java
package com.chaosweapons;

import com.chaosweapons.listener.InteractListener;
import com.chaosweapons.manager.CooldownManager;
import lombok.Getter;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class ChaosWeapons extends JavaPlugin {

    private CooldownManager cooldownManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.cooldownManager = new CooldownManager();
        
        getServer().getPluginManager().registerEvents(new InteractListener(this), this);
        
        getLogger().info("ChaosWeapons enabled successfully!");
    }

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

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (!command.getName().equalsIgnoreCase("chaosweapons")) {
            return false;
        }

        if (!sender.hasPermission("chaosweapons.admin")) {
            sender.sendMessage("§cYou don't have permission to use this command.");
            return true;
        }

        if (args.length == 0 || args[0].equalsIgnoreCase("reload")) {
            reloadConfig();
            sender.sendMessage("§aConfiguration reloaded successfully!");
            return true;
        }

        return false;
    }
}