From 4834aca6edff9e6014c6ffb3877e35591b145312 Mon Sep 17 00:00:00 2001 From: Bukkit/Spigot Date: Thu, 9 Jun 2022 21:30:20 +1000 Subject: [PATCH] SPIGOT-7003: Add missing PlayerAnimationType By: Doc --- .../java/org/bukkit/event/player/PlayerAnimationEvent.java | 7 +++---- .../java/org/bukkit/event/player/PlayerAnimationType.java | 3 ++- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/paper-api/src/main/java/org/bukkit/event/player/PlayerAnimationEvent.java b/paper-api/src/main/java/org/bukkit/event/player/PlayerAnimationEvent.java index 6cd236cd1..b7ca545c3 100644 --- a/paper-api/src/main/java/org/bukkit/event/player/PlayerAnimationEvent.java +++ b/paper-api/src/main/java/org/bukkit/event/player/PlayerAnimationEvent.java @@ -17,12 +17,11 @@ public class PlayerAnimationEvent extends PlayerEvent implements Cancellable { * Construct a new PlayerAnimation event * * @param player The player instance + * @param playerAnimationType The animation type */ - public PlayerAnimationEvent(@NotNull final Player player) { + public PlayerAnimationEvent(@NotNull final Player player, @NotNull final PlayerAnimationType playerAnimationType) { super(player); - - // Only supported animation type for now: - animationType = PlayerAnimationType.ARM_SWING; + animationType = playerAnimationType; } /** diff --git a/paper-api/src/main/java/org/bukkit/event/player/PlayerAnimationType.java b/paper-api/src/main/java/org/bukkit/event/player/PlayerAnimationType.java index ea4bf26f0..1eb91253a 100644 --- a/paper-api/src/main/java/org/bukkit/event/player/PlayerAnimationType.java +++ b/paper-api/src/main/java/org/bukkit/event/player/PlayerAnimationType.java @@ -4,5 +4,6 @@ package org.bukkit.event.player; * Different types of player animations */ public enum PlayerAnimationType { - ARM_SWING + ARM_SWING, + OFF_ARM_SWING }