Skip to content

Default value for the movement_speed attribute is not correct #13343

@ButterDebugger

Description

@ButterDebugger

Expected behavior

Setting the players movement_speed attribute to its built-in default value should properly reset the players movement_speed attribute to ~0.1

Observed/Actual behavior

Setting the players movement_speed attribute to its built-in default value sets it to 0.7, instead of ~0.1

Steps/models to reproduce

@EventHandler
public void onJoin(PlayerJoinEvent event) {
    Player player = event.getPlayer();
    AttributeInstance attribute = player.getAttribute(Attribute.MOVEMENT_SPEED);
    if (attribute == null) return;

    attribute.setBaseValue(attribute.getDefaultValue());
    player.sendRichMessage("Movement speed reset");
}

The code above executes when a player joins and will reset their base movement_speed attribute to its default value.
But instead, it sets the players base movement_speed to 0.7

I tested this with every other attribute and their true default value is equal to that of the getDefaultValue function, except for movement_speed.

Plugin and Datapack List

A custom plugin with the code above

Paper version

This server is running Paper version 1.21.10-115-main@af06383 (2025-11-21T23:42:01Z) (Implementing API version 1.21.10-R0.1-SNAPSHOT)
You are running the latest version
Previous version: 1.21.10-113-9fc21bc (MC: 1.21.10)

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions