[SPIGOT-7364] Player's isSprinting should not be disabled when this player attacks Created: 01/Jun/23  Updated: 25/Dec/24

Status: Open
Project: Spigot
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Minor
Reporter: Kami Rori Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: bug, entity, spigot

Version: CraftBukkit version 3760-Spigot-7d7b241-1f2dd8e (MC: 1.19.4) (Implementing API version 1.19.4-R0.1-SNAPSHOT)
Guidelines Read: Yes

 Description   

In Vanilla server, player keeps sprinting after attacking other entities, but in Bukkit server the sprinting will be cancelled.

But there is also a feature in Vanilla server is that, player can attack with strong knock back for once since he starts sprinting. If he stops sprinting and starts sprinting again, he can make another strong knock back. Bukkit has realized this feature by disable player's sprinting, but its not correct. You can remove isSprinting judgement in attack() method and add a new boolean called "isStrongKnockback" to it (When isStrongKnockback is true, player can make a strong knock back and then isStrongKnockback will be disabled. isStrongKnockback will be set to true again when player resets his sprinting state. (Also add a getter and a setter to this boolean plz)


Generated at Thu Apr 03 15:45:22 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.