Readd PlayerAnimationEvent constructor removed by upstream

This commit is contained in:
Nassim Jahnke 2022-06-10 14:43:59 +02:00
parent 8141349df1
commit 9a75a79edd
No known key found for this signature in database
GPG Key ID: 6BE3B555EBC5982B

View File

@ -38,7 +38,7 @@ index 0000000000000000000000000000000000000000..1a4550a73e89f9cf92d2831d21bcfb46
+ }
+}
diff --git a/src/main/java/org/bukkit/event/player/PlayerAnimationEvent.java b/src/main/java/org/bukkit/event/player/PlayerAnimationEvent.java
index b7ca545c3574d4639f2783f2367de871086a5704..eae7efdaea1f288b17101456aee37710ae2715e2 100644
index b7ca545c3574d4639f2783f2367de871086a5704..e93bb1ed0fdb99b38ecb84eba99bf08f150f75f0 100644
--- a/src/main/java/org/bukkit/event/player/PlayerAnimationEvent.java
+++ b/src/main/java/org/bukkit/event/player/PlayerAnimationEvent.java
@@ -7,6 +7,7 @@ import org.jetbrains.annotations.NotNull;
@ -49,3 +49,17 @@ index b7ca545c3574d4639f2783f2367de871086a5704..eae7efdaea1f288b17101456aee37710
*/
public class PlayerAnimationEvent extends PlayerEvent implements Cancellable {
private static final HandlerList handlers = new HandlerList();
@@ -24,6 +25,13 @@ public class PlayerAnimationEvent extends PlayerEvent implements Cancellable {
animationType = playerAnimationType;
}
+ // Paper start - readd old constructor
+ @Deprecated
+ public PlayerAnimationEvent(@NotNull final Player player) {
+ this(player, PlayerAnimationType.ARM_SWING);
+ }
+ // Paper end
+
/**
* Get the type of this animation event
*