Skip to content

PlayerAttackEntityCooldownResetEvent cancellation is non-functional #13578

@TheBentoBox

Description

@TheBentoBox

Expected behavior

Canceling PlayerAttackEntityCooldownResetEvent should prevent the player's attack cooldown from resetting, meaning they should be able to immediately attack again at full power.

Observed/Actual behavior

Canceling this event doesn't do anything. The player's attack cooldown still resets.

Example with listeners for the damage in a damage event and PlayerAttackEntityCooldownResetEvent, hitting twice quickly with a Sharpness V netherite sword.

Image

Corroborated by Barty from the PaperMC Discord who did his own testing.

Image

Steps/models to reproduce

  1. Register a listener for PlayerAttackEntityCooldownResetEvent which always cancels the event.
  2. Strike an entity twice rapidly. The second hit will do reduced damage when it shouldn't.

Plugin and Datapack List

Tested on a minimal reproduction server. Used Skript with skript-reflect for ease of logging.

> plugins
[20:32:20 INFO]: ℹ Server Plugins (2):
[20:32:20 INFO]: Bukkit Plugins:
[20:32:20 INFO]:  - Skript, skript-reflect
> datapack list
[20:32:21 INFO]: There are 3 data pack(s) enabled: [vanilla (built-in)], [file/bukkit (world)], [paper (built-in)]
[20:32:21 INFO]: There are no more data packs available

Paper version

> version
[20:33:03 INFO]: Checking version, please wait...
[20:33:03 INFO]: This server is running Paper version 1.21.11-99-main@81b9122 (2026-01-20T19:08:30Z) (Implementing API version 1.21.11-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.5-2429-9d0aa8e (MC: 1.21.5)

Other

Here's a minimal script that relies on just Skript and skript-reflect should that be your cup of tea.

import:
    com.destroystokyo.paper.event.player.PlayerAttackEntityCooldownResetEvent

on damage of living entity by player:
    broadcast "Damage: %final damage% hearts"

on PlayerAttackEntityCooldownResetEvent:
    event.setCancelled(true)
    event.getAttackedEntity().setNoDamageTicks(0)

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: acceptedDisputed bug is accepted as valid or Feature accepted as desired to be added.version: 1.21.11Game version 1.21.11

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions