senorbitor

I need a Minecraft plugin that removes the cooldown from the new weapon Spear. Players should be able to use the spear continuously without the normal cooldown delay.

Kodari AI
KodariMar 16 at 12:54 pm 2,844 (v2)

I’ll create a plugin that removes the cooldown from the Mace weapon (the spear-like weapon added in 1.21).

MaceNoCooldown
Removes the attack cooldown from the Mace weapon, allowing players to use it continuously without the normal cooldown delay. Players can swing and attack with the Mace at maximum speed, making combat more fluid and fast-paced.

Plugin created! This removes the attack cooldown from the Mace weapon by resetting it to 0 immediately after attacks and interactions, allowing continuous rapid use.

Kodari can make mistakes. Review important code before using.
Files
src
build.gradle
Code
4 99
src/main/java/com/example/macecooldown/MaceNoCooldown.java
package com.example.macecooldown;

import com.example.macecooldown.listeners.MaceListener;
import lombok.Getter;
import org.bukkit.plugin.java.JavaPlugin;

@Getter
public class MaceNoCooldown extends JavaPlugin {

    @Override
    public void onEnable() {
        getServer().getPluginManager().registerEvents(new MaceListener(), this);
        getLogger().info("MaceNoCooldown has been enabled!");
    }

    @Override
    public void onDisable() {
        getLogger().info("MaceNoCooldown has been disabled!");
    }
}