stuckkonyou.

create a spear that is used like this except I want the name to be Spartans Spear

1 image attached
Kodari AI
KodariApr 22 at 2:52 am 8,988 (v2)

I’ll create a custom spear weapon plugin with a dash ability, particle trails, and custom enchantments based on the image.

SpartansSpear
A custom weapon plugin featuring the legendary Spartan's Spear with a powerful dash ability. Shift-right-click to launch forward, leaving inferno and blood particle trails. Includes custom enchantments, attack stats, cooldown system, and admin commands. Perfect for PvP and combat-focused servers.

Project created! The Spartan’s Spear plugin features:

  • Custom trident-based spear with enchantments (Sharpness V, Unbreaking III, Mending)

  • Dash ability: Shift + Right-Click to launch forward

  • Particle trails: Inferno (flame) and blood (red dust) effects

  • 30-second cooldown system

  • Custom stats: 5 Attack Damage, 0.87 Attack Speed, Unbreakable

  • Command: /spartansspear [player] to give the weapon

  • Fully configurable colors, stats, particles, sounds, and messages

All XSeries wrappers used for cross-version compatibility (1.8-1.21+). The spear is identified by persistent data, so it works with server restarts.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
9 526
src/main/java/com/spartansspear/SpartansSpear.java
package com.spartansspear;

import com.spartansspear.commands.SpearCommand;
import com.spartansspear.listeners.SpearAbilityListener;
import com.spartansspear.managers.CooldownManager;
import com.spartansspear.managers.ParticleManager;
import com.spartansspear.managers.SpearManager;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class SpartansSpear extends JavaPlugin {

    private SpearManager spearManager;
    private CooldownManager cooldownManager;
    private ParticleManager particleManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();
        
        this.spearManager = new SpearManager(this);
        this.cooldownManager = new CooldownManager(this);
        this.particleManager = new ParticleManager(this);
        
        getServer().getPluginManager().registerEvents(new SpearAbilityListener(this), this);
        getCommand("spartansspear").setExecutor(new SpearCommand(this));
        
        getLogger().info("Spartan's Spear has been enabled!");
    }

    @Override
    public void onDisable() {
        if (particleManager != null) {
            particleManager.cancelAllTrails();
        }
        getLogger().info("Spartan's Spear has been disabled!");
    }
}