heloum

AXE NAME prefix <b><gradient:#9863E7:#DAC2FF>ᴡɪᴛʜᴇ</gradient><gradient:#DAC2FF:#DAC2FF>ʀ ʟᴇᴀᴘ</gradient></b> READY prefix <b><gradient:#9863E7:#DAC2FF>ʀᴇ</gradient><gradient:#DAC2FF:#DAC2FF>ᴀᴅʏ</gradient></b> so i have this code for my wither leap axe please maek it for my saturation spear dark green to light green ish make the same gradient for the cooldown and the ready please

maek me a custom netherite spear called the saturation spear use that for the name and stuff make it display in the action bar the ready and when its on cooldown make it display the cooldown also i nthe action bar when u hold the item out when u use it make it give u full saturation for 20 seconds make the enchants on it lunge 3 sharpness 3 unbreaking 3 and mending please make it say under the enchantments shift+right click to gain infinite saturation for 20 seconds. make the cooldown 1 minute 50 seconds make this in small caps green ish please :shift+right click to gain infinite saturation for 20 seconds.

make sure its good i had this problem before:Perfect just change the action bar cooldown thing to display just the cooldown seconds/ minutes eg 60s or 1:10m plesae and also maek it a gradient not just like the 6 is green then the 0 is a lighter then the s is a different shade maek it an actual gradient please and also for the shift+right clickm message its really long so its extending the like gui thing so make it say shift + right click to gain then start a line underneath and finish it off please or just make the text smaller to fit it in goodand also for the ready text actually use the gradient please

Kodari AI
KodariSep 30 at 6:02 pm 1
SaturationSpear
Creates a custom netherite spear called the Saturation Spear with a dark green to light green gradient display. When held, it shows READY in the action bar with the gradient, and when on cooldown, displays the cooldown timer in the same gradient format (e.g., 60s or 1:10m). Using the spear grants full saturation for 20 seconds. The spear has Lunge 3, Sharpness 3, Unbreaking 3, and Mending enchantments. A small green text under the enchantments reads "shift+right click to gain infinite saturation for 20 seconds." The cooldown is 1 minute 50 seconds, and the action bar display uses a proper gradient transition across the text.
  1. Create the Paper plugin setup and /saturationspear give command.

  2. Add the custom spear, requested enchantments and two-line small-caps lore.

  3. Implement shift-right-click saturation and a true green-gradient action bar for readiness/cooldown.

Created the Saturation Spear plugin with /saturationspear to obtain the item. Shift-right-click grants full hunger and saturation for 20 seconds, with a 1:50 cooldown.

The spear has Lunge III, Sharpness III, Unbreaking III, and Mending, plus the two-line small-caps green lore. While held in the main hand, its action bar shows a true green gradient: READY or just the remaining time, such as 1:50m or 60s.

heloum

use this as a reference photo please i want it the same just make the gradient dark green to light green and everything else change aswell to maek it green and stuff and make the ability say shift+right click to gain infinite saturation for 20 seconds make it small caps and the dark green to light green gradient aswell and then when ur holding out the spear when its not on cooldown make it say ready and stuff and hwen on cooldown like that remember the actual gradient please

3 images attached
Kodari AI
KodariSep 30 at 6:09 pm 1

I’ll match the reference’s two-line held display, keep the cooldown as a gradient-only timer, and style the spear name and two-line ability lore in the same dark-to-light green gradient. First I’m checking whether the project already supplies XSeries, since the current item code imports it.

Updated the held-item display to match the reference: READY or the cooldown timer appears above SATURATION SPEAR, with a real character-by-character dark-to-light green gradient. The name, small-caps ability lore, and 1:50 cooldown lore use the same gradient and bold italic styling; the requested enchantments are preserved.

The plugin uses the netherite spear material when the server supports it, and falls back to a netherite sword on older versions.

heloum

make it on the action bar not the screen and make it only say for eg 1:50m or 60s

Kodari AI
KodariSep 30 at 6:14 pm 1

Changed the cooldown display to the action bar only. While the spear is cooling down, it shows just the green-gradient timer (for example, 1:50m or 60s); when ready, the action bar is cleared.

heloum

do the exact same but for a custom netherite spear called dash spear make it orange to yellow gradient and when u shift+right click it dashes you cooldown 40 seconds enchantments lunge 3 unbreaking 3 sharpness 5 mending please

Kodari AI
KodariSep 30 at 6:26 pm 1
  1. Add /dashspear to give a separate custom netherite spear.

  2. Add shift-right-click forward dash with a 40-second cooldown and requested enchantments.

  3. Show only the cooldown timer in the action bar, using an orange-to-yellow character-by-character gradient.

Added /dashspear with a custom orange-to-yellow gradient, Lunge III, Unbreaking III, Sharpness V, and Mending. Shift-right-click dashes you in the direction you’re facing, with a 40-second cooldown shown as only a gradient timer in the action bar.

heloum

so how do i download it?>

Kodari AI
KodariSep 30 at 6:27 pm 1

There isn’t a ready-made .jar attached here—the project currently contains the source files. Use the project’s Download/Export option to download the source, then build it with Gradle:

Shell
gradle build

The plugin .jar will be in build/libs/. Put that .jar in your server’s plugins folder and restart the server.

heloum

can u make a new plugin not use the saturation spear one bro

Kodari AI
KodariSep 30 at 6:28 pm 1
  1. Split this into a standalone Dash Spear plugin: remove Saturation Spear code and command, and rename the project, package, and plugin metadata.

Converted the project into a standalone DashSpear plugin. The Saturation Spear code and command are removed; /dashspear gives the orange-to-yellow Dash Spear with its 40-second cooldown. Build it with Gradle—the plugin JAR will be in build/libs/.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
4 226
src/main/java/com/kodari/dashspear/DashSpearPlugin.java
package com.kodari.dashspear;

import net.kyori.adventure.text.Component;
import net.kyori.adventure.text.format.TextDecoration;
import net.kyori.adventure.text.format.TextColor;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.NamespacedKey;
import org.bukkit.Registry;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.enchantments.Enchantment;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
import org.bukkit.event.Listener;
import org.bukkit.event.block.Action;
import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.meta.ItemMeta;
import org.bukkit.persistence.PersistentDataType;
import org.bukkit.plugin.java.JavaPlugin;
import org.bukkit.scheduler.BukkitRunnable;
import org.bukkit.util.Vector;

import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.UUID;
import java.util.concurrent.ConcurrentHashMap;

public final class DashSpearPlugin extends JavaPlugin implements Listener {
    private static final long DASH_COOLDOWN_MILLIS = 40_000L;
    private static final int DARK_ORANGE = 0xE06B16;
    private static final int LIGHT_YELLOW = 0xFFF29A;

    private final Map<UUID, Long> dashCooldowns = new ConcurrentHashMap<>();
    private NamespacedKey dashSpearKey;

    @Override
    public void onEnable() {
        dashSpearKey = new NamespacedKey(this, "dash_spear");
        getServer().getPluginManager().registerEvents(this, this);
        getCommand("dashspear").setExecutor(this::giveDashSpear);
        startActionBarTask();
    }

    private boolean giveDashSpear(CommandSender sender, Command command, String label, String[] args) {
        if (!(sender instanceof Player player)) {
            sender.sendMessage("Only players can receive the Dash Spear.");
            return true;
        }

        Map<Integer, ItemStack> leftovers = player.getInventory().addItem(createDashSpear());
        leftovers.values().forEach(item -> player.getWorld().dropItemNaturally(player.getLocation(), item));
        player.sendMessage("§6You received the Dash Spear.");
        return true;
    }

    private ItemStack createDashSpear() {
        ItemStack item = new ItemStack(netheriteSpearMaterial());
        ItemMeta meta = item.getItemMeta();
        meta.displayName(dashGradientStyled("ᴅᴀsʜ sᴘᴇᴀʀ"));
        addEnchant(meta, "LUNGE", 3);
        addEnchant(meta, "UNBREAKING", 3);
        addEnchant(meta, "SHARPNESS", 5);
        addEnchant(meta, "MENDING", 1);
        meta.lore(List.of(
                dashGradientStyled("sʜɪғᴛ + ʀɪɢʜᴛ ᴄʟɪᴄᴋ ᴛᴏ"),
                dashGradientStyled("ᴅᴀsʜ ғᴏʀᴡᴀʀᴅ"),
                Component.empty(),
                dashGradientStyled("ᴄᴏᴏʟᴅᴏᴡɴ: 40 sᴇᴄᴏɴᴅs")
        ));
        meta.getPersistentDataContainer().set(dashSpearKey, PersistentDataType.BYTE, (byte) 1);
        item.setItemMeta(meta);
        return item;
    }

    private Material netheriteSpearMaterial() {
        Material spearMaterial = Material.matchMaterial("NETHERITE_SPEAR");
        if (spearMaterial == null) {
            spearMaterial = Material.matchMaterial("NETHERITE_SWORD");
        }
        if (spearMaterial == null) {
            throw new IllegalStateException("Could not create a netherite item for the spear.");
        }
        return spearMaterial;
    }

    private void addEnchant(ItemMeta meta, String name, int level) {
        Enchantment enchantment = Registry.ENCHANTMENT.get(
                NamespacedKey.minecraft(name.toLowerCase(Locale.ROOT))
        );
        if (enchantment != null) {
            meta.addEnchant(enchantment, level, true);
        }
    }

    @EventHandler
    public void onDashSpearUse(PlayerInteractEvent event) {
        Action action = event.getAction();
        if (action != Action.RIGHT_CLICK_AIR && action != Action.RIGHT_CLICK_BLOCK) {
            return;
        }

        Player player = event.getPlayer();
        if (!player.isSneaking()) {
            return;
        }

        long now = System.currentTimeMillis();
        if (isDashSpear(event.getItem())) {
            event.setCancelled(true);
            if (dashCooldowns.getOrDefault(player.getUniqueId(), 0L) > now) {
                return;
            }

            dashCooldowns.put(player.getUniqueId(), now + DASH_COOLDOWN_MILLIS);
            Vector dashVelocity = player.getLocation().getDirection().normalize().multiply(2.0);
            player.setVelocity(dashVelocity);
        }
    }

    private boolean isDashSpear(ItemStack item) {
        if (item == null || !item.hasItemMeta()) {
            return false;
        }
        return item.getItemMeta().getPersistentDataContainer().has(dashSpearKey, PersistentDataType.BYTE);
    }

    private void startActionBarTask() {
        new BukkitRunnable() {
            @Override
            public void run() {
                long now = System.currentTimeMillis();
                for (Player player : Bukkit.getOnlinePlayers()) {
                    ItemStack heldItem = player.getInventory().getItemInMainHand();
                    boolean holdingDashSpear = isDashSpear(heldItem);
                    if (!holdingDashSpear) {
                        continue;
                    }

                    long cooldownUntil = dashCooldowns.getOrDefault(player.getUniqueId(), 0L);
                    if (cooldownUntil <= now) {
                        dashCooldowns.remove(player.getUniqueId());
                        player.sendActionBar(Component.empty());
                    } else {
                        long seconds = (cooldownUntil - now + 999L) / 1_000L;
                        player.sendActionBar(dashGradient(formatCooldown(seconds)));
                    }
                }
            }
        }.runTaskTimer(this, 0L, 10L);
    }

    private String formatCooldown(long seconds) {
        if (seconds < 60) {
            return seconds + "s";
        }
        return (seconds / 60) + ":" + String.format("%02d", seconds % 60) + "m";
    }

    private Component gradient(String text, int startRgb, int endRgb) {
        int[] codePoints = text.codePoints().toArray();
        Component result = Component.empty();
        for (int index = 0; index < codePoints.length; index++) {
            double progress = codePoints.length <= 1 ? 0.0 : (double) index / (codePoints.length - 1);
            int red = interpolate((startRgb >> 16) & 0xFF, (endRgb >> 16) & 0xFF, progress);
            int green = interpolate((startRgb >> 8) & 0xFF, (endRgb >> 8) & 0xFF, progress);
            int blue = interpolate(startRgb & 0xFF, endRgb & 0xFF, progress);
            String character = new String(Character.toChars(codePoints[index]));
            result = result.append(Component.text(character, TextColor.color(red, green, blue)));
        }
        return result;
    }

    private Component dashGradient(String text) {
        return gradient(text, DARK_ORANGE, LIGHT_YELLOW)
                .decorate(TextDecoration.BOLD)
                .decorate(TextDecoration.ITALIC);
    }

    private Component dashGradientStyled(String text) {
        return dashGradient(text);
    }

    private int interpolate(int start, int end, double progress) {
        return (int) Math.round(start + (end - start) * progress);
    }
}