Kokou king

a plugin that makes item cooldowns persist when they log back on after having logged out with items on cooldown.

Kodari AI
KodariSep 1 at 3:36 am 1
PersistentCooldowns
A Minecraft plugin that saves player item cooldowns to persistent storage when they log out, and restores them upon rejoin. It tracks all active item cooldowns in real-time, storing the remaining duration and item type per player. On logout, the plugin serializes cooldown data to a YAML file; on login, it reapplies any still-active cooldowns to the player. The plugin handles server restarts gracefully, ensuring cooldowns survive disconnects and crashes. It includes configurable messages for cooldown restoration and supports per-item cooldown durations defined in the config. Lightweight and dependency-free, it integrates seamlessly with vanilla Minecraft mechanics.
  1. Create the Gradle project and plugin metadata.

  2. Add configurable interaction cooldown handling.

  3. Persist remaining cooldown expiry times on quit/disable and restore them on join.

  4. Add a reload command and default configuration.

Created PersistentCooldowns, a Paper plugin that:

  • Applies configurable item cooldowns on interaction.

  • Blocks item use while the cooldown is active.

  • Saves remaining cooldown time on quit and plugin shutdown.

  • Restores cooldowns when players rejoin, accounting for elapsed offline time.

  • Includes /persistentcooldowns reload with /pcooldowns alias.

  • Stores player cooldown data in plugins/PersistentCooldowns/cooldowns.yml.

Configure items and durations in config.yml; values are measured in Minecraft ticks.

Kokou king

make a plugin that makes it so if any of a player's items gets put on cooldown like a shield being disabled by an axe then it when the player logs out and logs back on the cooldown is still there

Kodari AI
KodariSep 1 at 3:54 am 1
  1. Update cooldown tracking to capture every active Bukkit item cooldown, regardless of whether it came from this plugin.

  2. Persist each player’s remaining cooldown on quit and plugin shutdown, then restore it on join.

  3. Remove the config-only interaction behavior so shield disables and other externally applied cooldowns are covered automatically.

Updated PersistentCooldowns so it now persists all item cooldowns, including cooldowns applied by vanilla Minecraft or other plugins.

  • Tracks every item type currently in a player’s inventory, armor, and off-hand.

  • Detects cooldowns automatically once per tick.

  • Saves active cooldowns on logout and server shutdown.

  • Restores remaining cooldown time when the player rejoins.

  • Shield disable cooldowns from axes are now preserved.

  • Removed the old config-only cooldown behavior; no item list configuration is required.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
settings.gradle
Code
9 307
src/main/java/com/kodari/persistentcooldowns/PersistentCooldownsPlugin.java
package com.kodari.persistentcooldowns;

import org.bukkit.Bukkit;
import org.bukkit.entity.Player;
import org.bukkit.plugin.java.JavaPlugin;

import java.util.Objects;

public final class PersistentCooldownsPlugin extends JavaPlugin {

    private CooldownManager cooldownManager;

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

        CooldownStorage storage = new CooldownStorage(this);
        cooldownManager = new CooldownManager(this, storage);

        getServer().getPluginManager().registerEvents(new CooldownListener(cooldownManager), this);
        cooldownManager.startTracking();

        ReloadCommand reloadCommand = new ReloadCommand(this, cooldownManager);
        Objects.requireNonNull(getCommand("persistentcooldowns")).setExecutor(reloadCommand);
        Objects.requireNonNull(getCommand("persistentcooldowns")).setTabCompleter(reloadCommand);
    }

    @Override
    public void onDisable() {
        if (cooldownManager == null) {
            return;
        }

        for (Player player : Bukkit.getOnlinePlayers()) {
            cooldownManager.save(player);
        }
        cooldownManager.stopTracking();
    }
}