-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Open
Labels
status: acceptedDisputed bug is accepted as valid or Feature accepted as desired to be added.Disputed bug is accepted as valid or Feature accepted as desired to be added.version: 1.21.11Game version 1.21.11Game version 1.21.11
Description
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.
Corroborated by Barty from the PaperMC Discord who did his own testing.
Steps/models to reproduce
- Register a listener for
PlayerAttackEntityCooldownResetEventwhich always cancels the event. - 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 availablePaper 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)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
status: acceptedDisputed bug is accepted as valid or Feature accepted as desired to be added.Disputed bug is accepted as valid or Feature accepted as desired to be added.version: 1.21.11Game version 1.21.11Game version 1.21.11