[SPIGOT-5833] Player#setWalkSpeed not working Created: 26/Jun/20  Updated: 26/Jun/20  Resolved: 26/Jun/20

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

Type: Bug Priority: Minor
Reporter: Shane Bee Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: 1.16.1

Attachments: File TesterPlugin-1.0.0.jar    
Version: git-Spigot-8fc58f1-709b003 (MC: 1.16.1)
Plugin: just the TesterPlugin
Guidelines Read: Yes

 Description   

Whilst working on a plugin I noticed that the

Player#setWalkSpeed

method was not working.
This previously worked fine in 1.15.2, when setting it in 1.16.1, the player's field of view changes (albeit it appears to be backwards) but the actual movement speed does not change at all.

Simple Test:

player.setWalkSpeed(0.5f);

Expected: This value should speed the player up.

Result: The field of view "zooms in" as if the player were to slow down. Their actual movement speed does not change.

player.setWalkSpeed(0.01f);

Expected: This value should slow the player down.

Result: The field of view "zooms out" as if the player were going to be moving very fast. Their actual movement speed does not change.

Have I tested on vanilla:
No I have not, Im not entire sure if/how I would be able to modify a player's speed in vanilla.
This could potentially be a vanilla issue, I'm not quite sure.

Including a plugin:
Yes, I have included a simple plugin to test speed.

/test [speed = float]

You can choose your speed here, ex:

/test 0.5
or
/test 0.01

or you can simply negate the float and it will reset back to default 0.2f



 Comments   
Comment by Shane Bee [ 26/Jun/20 ]

Awesome, thanks for the super fast fix, works like a charm, I appreciate it!

Comment by md_5 [ 26/Jun/20 ]

It's now a combination of that and the MOVEMENT_SPEED attribute.
I will make setWalkSpeed set the MOVEMENT_SPEED attribute for convenience but it will be possible for plugins to desync it afterwards

Generated at Tue Apr 08 02:45:44 UTC 2025 using Jira 10.3.3#10030003-sha1:d220e3fefc8dfc6d47f522d3b9a20c1455e12b7b.