adriansvallers-dotcom

Make a cooldown plugin for special items that i already have in game, thats above ur hot bar like this one in the picture for Dash Sword - 20 seconds - color green, for Pull Sword - 45 seconds - color purple, For Frozen Crossbow - 60 seconds - color Ice blue, For cobweb axe - 20 seconds - color orange, for Sonic Boom Bow - 60 seconds - color dark blue. when its charged it will say ready

1 image attached
Kodari AI
KodariMar 1 at 10:29 pm 8,566 (v2)

I’ll create a cooldown display plugin that shows item cooldowns above the hotbar with color-coded status messages.

ItemCooldownDisplay
A visual cooldown system for special items that displays cooldown timers above the hotbar using action bar messages. Supports multiple item types with customizable durations and colors. Shows remaining time during cooldown and READY when available. Features automatic cooldown tracking per player with configurable item names, durations, and display colors.

Plugin created! This cooldown display system will:

  • Detect when special items are used (right-click)

  • Start cooldowns with configured durations and prevent re-use during cooldown

  • Display real-time cooldown status above the hotbar using action bar messages

  • Show colored item names with remaining seconds during cooldown

  • Display “READY” in white when items are available

  • Track each item independently per player

The config includes all 5 items with their specified cooldowns and colors. Players will see status indicators above their hotbar showing which items are ready and which are on cooldown with the time remaining.

adriansvallers-dotcom

whenever im holding one of the item listeb above the cooldowns for all of them apear make it so they appear one by one and they move to the side of each other and make it so it only shows READY not the full name and the Ready is the weapons color

Kodari AI
KodariMar 1 at 10:36 pm 15,119 (v2)

I’ll read the project files to understand the current implementation and make the necessary changes.

Now I’ll modify the ActionBarTask to show only the held item’s cooldowns, display them side by side, and show just “READY” in the weapon’s color.

Now I’ll update the ActionBarTask to show all configured items side by side, displaying only “READY” in the weapon’s color when ready:

All items now display side by side when holding any configured item. Each shows only “READY” in its weapon color when ready, or the full cooldown format when on cooldown. Only items the player has in their inventory are shown.

adriansvallers-dotcom

make it so i can reload the cross bow even tho im on cooldown add this aswell

Kodari AI
KodariMar 1 at 10:38 pm 3,998 (v2)

I’ll check the current implementation and modify it to allow crossbow reloading even during cooldown.

I’ll modify the listener to allow crossbow reloading even during cooldown.

Modified the listener to allow crossbow reloading during cooldown - the event is no longer cancelled for crossbows, but the cooldown message still displays.

adriansvallers-dotcom

make it so when we shoot the frozen crossbow or the sonic boom bow thats when the cooldown starts and for the pull sword make the cooldown start once its used on a player because the sword pulls them when their in a specified radius but if their not in the radius it does not pull them and the cooldown starts for no reason even tho i still didnt use the sword because of the radius

Kodari AI
KodariMar 1 at 10:45 pm 9,183 (v2)

I’ll help you fix the cooldown timing for these items. Let me first read the relevant files to understand the current implementation.

Now I can see the issue. The cooldown starts immediately on right-click, but for these items we need different triggers. Let me fix this:

  1. Frozen Crossbow & Sonic Boom Bow - Cooldown should start when the projectile is actually shot

  2. Pull Sword - Cooldown should start only when it successfully pulls a player

adriansvallers-dotcom

Dash sword does not show

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
8 493
src/main/java/com/itemcooldown/ItemCooldownDisplay.java
package com.itemcooldown;

import com.itemcooldown.listener.ItemCooldownListener;
import com.itemcooldown.manager.CooldownManager;
import com.itemcooldown.task.ActionBarTask;
import lombok.Getter;
import org.bukkit.command.Command;
import org.bukkit.command.CommandSender;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class ItemCooldownDisplay extends JavaPlugin {

    private CooldownManager cooldownManager;
    private ActionBarTask actionBarTask;

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

        this.cooldownManager = new CooldownManager(this);
        
        getServer().getPluginManager().registerEvents(new ItemCooldownListener(this), this);
        
        this.actionBarTask = new ActionBarTask(this);
        this.actionBarTask.runTaskTimer(this, 0L, 1L);

        getLogger().info("ItemCooldownDisplay has been enabled!");
    }

    @Override
    public void onDisable() {
        if (actionBarTask != null) {
            actionBarTask.cancel();
        }
        if (cooldownManager != null) {
            cooldownManager.clearAll();
        }
        getLogger().info("ItemCooldownDisplay has been disabled!");
    }

    @Override
    public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
        if (command.getName().equalsIgnoreCase("itemcooldown")) {
            if (!sender.hasPermission("itemcooldown.admin")) {
                sender.sendMessage("§cYou don't have permission to use this command.");
                return true;
            }

            if (args.length > 0 && args[0].equalsIgnoreCase("reload")) {
                reloadConfig();
                cooldownManager.clearAll();
                sender.sendMessage("§aItemCooldownDisplay configuration reloaded!");
                return true;
            }

            sender.sendMessage("§7ItemCooldownDisplay v" + getDescription().getVersion());
            sender.sendMessage("§7Usage: /itemcooldown reload");
            return true;
        }
        return false;
    }
}