PaperMC / Paper

The most widely used, high performance Minecraft server that aims to fix gameplay and mechanics inconsistencies
https://papermc.io/
Other
9.99k stars 2.32k forks source link

Player::resetCooldown doesn't update the attack speed bar #11597

Closed FaMa91 closed 3 days ago

FaMa91 commented 3 days ago

Expected behavior

The use of Player::resetCooldown resets the cooldown of the attack speed and this shows the attack speed bar

Observed/Actual behavior

The use of Player::resetCooldown resets the cooldown of the the attack speed but the attack speed bar is not shown

Steps/models to reproduce

This is my test (where the log method just print a log in console):

@EventHandler(priority = EventPriority.HIGH)
public void onPlayerItemHeld(PlayerItemHeldEvent event) {
    log("getAttackCooldown: " + event.getPlayer().getAttackCooldown());
    event.getPlayer().resetCooldown();
    log("getAttackCooldown2: " + event.getPlayer().getAttackCooldown());

From the first log I can see the attackCooldown seems to be right and from the second log I can see it just restarted from 0 but on the user interface I cannot see this behaviour

Plugin and Datapack List

23:12:13 INFO: Server Plugins (52): 23:12:13 INFO: Paper Plugins: 23:12:13 INFO: - HuskSync 23:12:13 INFO: Bukkit Plugins: 23:12:13 INFO: - AntiPopup, BattlePass, BetonQuest, BlockLocker, Citizens, CMI, CMILib, CommandAPI, CommandBlocker, CoreProtect 23:12:13 INFO: CrazyAdvancementsAPI, DecentHolograms, DeluxeMenus, Denizen, Depenizen, DisplayEntityEditor, ExtraContexts, FastAsyncVoxelSniper, Feudal, FeudalWars 23:12:13 INFO: FeudsCore, FilteredHoppers, goPaint, IllegalStack, LibsDisguises, LPX, LuckPerms, MinecraftToJMX, MobFarmManager, ModelEngine 23:12:13 INFO: MythicCrucible, MythicMobs, NBTAPI, NexEngine, PlaceholderAPI, PlayerParticles, ProtocolLib, PvPManager, SimpleScore, spark 23:12:13 INFO: SyncCommands, TAB-Bridge, Terra, TicketMaster, TradeMe, Vault, ViaVersion, WorldBorder, WorldEdit, WorldGuard

[23:12:34 INFO]: There are 3 data packs enabled: [vanilla (built-in)], [file/Neos (world)], [file/bukkit (world)] [23:12:34 INFO]: There are no more data packs available

Paper version

This server is running Paper version git-Paper-"483368e" (MC: 1.19.4) (Implementing API version 1.19.4-R0.1-SNAPSHOT) (Git: 483368e on ver/1.19.4) Error obtaining version information Previous version: git-Paper-530 (MC: 1.19.4)

Other

I use a slighty modified version of git-Paper-550 (MC: 1.19.4) with an update of ASM for compatibility reasons. This should not be related to that issue so please check yourself the behaviour coping my test

electronicboy commented 3 days ago

1.19.4 hasn't been supported in a good while now, and the server has 0 control over this