SPIGOT-5833: Player#setWalkSpeed not working

This commit is contained in:
md_5 2020-06-26 17:56:49 +10:00
parent 709b003fee
commit baadbf3f76
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -1399,6 +1399,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
EntityPlayer player = getHandle();
player.abilities.walkSpeed = value / 2f;
player.updateAbilities();
getHandle().getAttributeInstance(GenericAttributes.MOVEMENT_SPEED).setValue(player.abilities.walkSpeed); // SPIGOT-5833: combination of the two in 1.16+
}
@Override