3
0
Mirror von https://github.com/GeyserMC/Geyser.git synchronisiert 2024-07-01 19:08:07 +02:00

GeyserSession: Set a default value for attackSpeed (#1419)

Fixes cooldowns not showing on a fresh world.
Dieser Commit ist enthalten in:
Camotoy 2020-10-19 19:03:31 -04:00 committet von GitHub
Ursprung 18e2a52d98
Commit b02bc33393
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 4AEE18F83AFDEB23

Datei anzeigen

@ -194,9 +194,10 @@ public class GeyserSession implements CommandSender {
/**
* The current attack speed of the player. Used for sending proper cooldown timings.
* Setting a default fixes cooldowns not showing up on a fresh world.
*/
@Setter
private double attackSpeed;
private double attackSpeed = 4.0d;
/**
* The time of the last hit. Used to gauge how long the cooldown is taking.
* This is a session variable in order to prevent more scheduled threads than necessary.