n0_th3nightmar3_0n
📎 1 file 5,247 chars
📄
pasted-code-1785622494162.txt
txt 87 lines
▶
Item: Netherite Spear
Item Name: Darkened Spear (In Bold color code with Gray color slowly fading to black NO ITALIC)
Obtained using: /DarkenedSpear 
Command that resets the cooldown of the spear: /darkenedspearcd
The item is unbreakable
here are the Enchants:
Sharpness 8
Unbreaking 10
Lunge 4 
Looting 10
Fire aspect 5
Knockback 3

Here are the passives:
Reflection of hatred= has a 10% chance to push the attacker backwards inflicting darkness 2, slowness 3 and wither 3 for 8 seconds when the player takes damage from the attacker
Eternal Damnation = has a 25% chance when dealing a charge attack the damage is doubled and inflicts darkness 8 and wither 4
Rejuvination of Darkness= the jab attack lunge enchantment hunger drain is capped at 5 hunger bars it cannot go less than that and whenever jab attacked with the spear grants the player resistance 2 effect and also has a 25% chance everytime lunged will recover 1 hunger bar and 1.5 saturation
Cryptic Tactics= when using charge attack if the victim is holding the shield to block the attack, the charge attack ignores the shield and still deals the same damage to the player who held the shield, also stunning the shield for 8 seconds.

here are the abilities:

Darkness purity: (Activated with shift right click on air or block) 
when right clicked first will cancel the event of charge attack and instead 
does a circle particle effect on the ground with 8 block radius
that follows the player and whoever is in that circle or radius within the player is inflicted with 12 seconds of wither 4
slowness 2, darkness 8, blindness 8 and feather falling 4 also dealing 8 damage
that lasts for 18 seconds
Cooldown: 88 seconds


Created Damnation: (Activated in off hand with shift right click on air or block)
Launchs you forward at insane velocity
which when activated will spawn alot of black dust particle around the player that lasts for the duration of the ability
the ability is active for 4 seconds and
whoever is damaged within 4 seconds of the ability will take 2 times the damage and will be stunned for
5 seconds not being able to move or being able to do anything to escape, also if the victim blocked the attack with a shield
the shield will be stunned, dealing 50% durability and dealing the same amount of damage the spear was supposed to deal.
Cooldown: 160 seconds

Last Hatred: (Activated with jab attacking with the spear on air or block)
when player does a jab attack the lunge enchantment will have its effect's doubled making the player lunge at twice speed
and healing the player by 1 heart and filling the hunger bar to the max
also spawning a trial of black particles that last for 2 seconds
Cooldown: 10s

And please add an action bar cooldown like showing the cooldown of every ability in actionbar
It should be like this
%Darkness Purity Icon (Which is fire emoji icon in dark gray color)% %cooldown timer of darkness purity%, %Last Hatred icon (which is an Axe emoji icon written in gray color)% %cooldown timer of last hatred%, %Created Damnation icon (Which is a diamond icon written in light gray color)% %Cooldown timer of Created Damnation%
And if it was active well instead of turning off the cooldown say ready in light green color for each of the abilities

and make a loop that if the item was dis enchanted make it re enchant back in 1 tick,
And improve the detection system so whenever an ability or passive activates it does activate Instantly


Here is the item lore you need to add to the item:
Enchantments (In Bold Color code with Bright Purple color Slowly fading to white No Italic color code)

Sharpness VIII (In Dark Gray Slowly fading to Light Gray No Italic color code)
Unbreaking X (In Light Green Slowly Fading to White No Italic color code)
Lunge IV (In Light blue Slowly fading to white No Italic color code)
Looting X (In White slowly fading to dark gray No Italic color code)
Mending IV (In Dark gray Slowly fading to Green No Italic color code)
Fire Aspect V (In Orange slowly fading to dark gray No Italic color code)
Knockback III (In Dark Red slowly fading to Red No Italic color code)


Passives (In Bold Color code with Light Gray color slowly fading to Dark Gray No Italic color code)

(passive's names should just in gray color)
Reflection Of Hatred
Eternal Damnation
Rejuvination Of Darkness
Cryptic Tactics


Abilities (In Bold Color code with White color slowly fading to gray No Italic color code)

Darkness Purity %Fire Icon% (Written in Gray Color slowly fading to Black No Italic color code) (Also for the place holder %Fire Icon% just replace it with an Fire Emoji Icon)
Created Damnation %Diamond icon% (Written Dark Gray color slowly fading to Light Gray No Italic color code) (Also for the place holder %Fire Icon% just replace it with an Diamond Emoji Icon)
Last Hatred %Axe icon% (Written Dark Gray color slowly fading to Light Gray No Italic color code) (Also for the place holder %Axe Icon% just replace it with an Axe Emoji Icon)


----={ Divine Spear }=---- (Written in Bold Color code with Aqua color slowly fading to white)


Now remember the Spear or Netherite spear is from 1.21.11 so make sure to know the mechanics.
Kodari AI
KodariAug 1 at 10:17 pm 15
DarkenedSpear
A Paper Minecraft plugin that adds the Darkened Spear, a custom Netherite spear with persistent enchantments, gradient-styled lore, passive combat effects, and three cooldown-based abilities. Darkness Purity creates a damaging debuff zone, Created Damnation launches and empowers the wielder while stunning victims, and Last Hatred enhances jab attacks. The plugin also restores removed enchantments, displays live action-bar cooldowns, supports shield disruption, and provides commands for obtaining and resetting the spear.
  1. Create the Paper plugin foundation, metadata, build configuration, and configurable combat values.

  2. Add the spear item factory, cooldown and stun managers, commands, and effect helpers.

  3. Add instant interaction, combat, passive, ability, action-bar, and enchantment-restoration handling.

DarkenedSpearPlugin
A Paper 1.21.11 combat plugin that adds the Darkened Spear, a custom unbreakable netherite spear with enhanced enchantments, four reactive passives, and three cooldown-based abilities. It provides instant interaction detection, charge and jab combat handling, shield disruption, player stuns, visual particle effects, temporary combat zones, automatic enchantment restoration, item lore styling, and an action bar that displays the readiness of every ability.

__

Created the complete DarkenedSpearPlugin project with:

  • Paper 1.21.11 Gradle setup and plugin metadata

  • /darkenedspear and /darkenedspearcd commands

  • Custom Darkened Spear item with enchantments, lore, gradients, and persistent identification

  • Reflection of Hatred, Eternal Damnation, Rejuvenation of Darkness, and Cryptic Tactics passives

  • Darkness Purity, Created Damnation, and Last Hatred abilities

  • Cooldown action bar with ability icons and ready timers

  • Shield damage and stun mechanics

  • Darkness, Wither, Slowness, Blindness, Resistance, and Slow Falling effects

  • Particle trails and area effects

  • One-tick enchantment restoration loop

  • Configurable cooldowns, ability durations, and passive chances

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
14 835
src/main/java/com/kodari/darkened/DarkenedSpearPlugin.java
package com.kodari.darkened;

import com.kodari.darkened.command.CooldownCommand;
import com.kodari.darkened.command.DarkenedSpearCommand;
import com.kodari.darkened.item.SpearItemFactory;
import com.kodari.darkened.manager.AbilityManager;
import com.kodari.darkened.manager.CooldownManager;
import com.kodari.darkened.manager.StunManager;
import com.kodari.darkened.listener.SpearListener;
import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitRunnable;

public final class DarkenedSpearPlugin extends JavaPlugin {
    private SpearItemFactory spearItemFactory;
    private CooldownManager cooldownManager;
    private StunManager stunManager;
    private AbilityManager abilityManager;

    @Override
    public void onEnable() {
        saveDefaultConfig();

        this.spearItemFactory = new SpearItemFactory();
        this.cooldownManager = new CooldownManager();
        this.stunManager = new StunManager();
        this.abilityManager = new AbilityManager(this, cooldownManager, stunManager);

        getServer().getPluginManager().registerEvents(
                new SpearListener(spearItemFactory, cooldownManager, stunManager, abilityManager),
                this
        );

        getCommand("darkenedspear").setExecutor(new DarkenedSpearCommand(spearItemFactory));
        getCommand("darkenedspearcd").setExecutor(new CooldownCommand(cooldownManager));

        startMaintenanceTask();
    }

    private void startMaintenanceTask() {
        new BukkitRunnable() {
            @Override
            public void run() {
                for (Player player : Bukkit.getOnlinePlayers()) {
                    ItemStack mainHand = player.getInventory().getItemInMainHand();
                    ItemStack offHand = player.getInventory().getItemInOffHand();

                    if (spearItemFactory.isDarkenedSpear(mainHand)) {
                        spearItemFactory.restoreEnchantments(mainHand);
                    }
                    if (spearItemFactory.isDarkenedSpear(offHand)) {
                        spearItemFactory.restoreEnchantments(offHand);
                    }

                    if (spearItemFactory.isDarkenedSpear(mainHand) || spearItemFactory.isDarkenedSpear(offHand)) {
                        player.sendActionBar(cooldownManager.formatActionBar(player));
                    }
                }
            }
        }.runTaskTimer(this, 1L, 1L);
    }

    public SpearItemFactory getSpearItemFactory() {
        return spearItemFactory;
    }

    public CooldownManager getCooldownManager() {
        return cooldownManager;
    }

    public StunManager getStunManager() {
        return stunManager;
    }

    public AbilityManager getAbilityManager() {
        return abilityManager;
    }
}