1.15.2 Getting Attack Cooldown Progress

Discussion in 'Spigot Plugin Development' started by abandoncaptian, Feb 23, 2020.

  1. I need to get the attack cooldown on a player, I did some digging and found how to do this with 1.9 and 1.12 but I'm working on 1.15.
    These are some of the things I found, but I need help finding the method for 1.15
    https://hub.spigotmc.org/stash/projects/SPIGOT/repos/craftbukkit/browse/nms-patches
    https://www.spigotmc.org/threads/get-attack-indicator.132402/page-2
    https://www.spigotmc.org/threads/getting-player-attack-cooldown.138505/
    https://www.spigotmc.org/threads/1-9-2-get-current-players-attack-cooldown-value.143200/

    Bit of extra info, I'm using modified attack cooldowns Via ItemStack with Attribute Modifiers.
     
  2. I don't know, but have you tried using Reflection?
     
  3. No because the method has changed so there isn't way to do reflection if you dont know the method