3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-16 03:20:07 +01:00

Readd PlayerAnimationEvent constructor removed by upstream

Dieser Commit ist enthalten in:
Nassim Jahnke 2022-06-10 14:43:59 +02:00
Ursprung 8141349df1
Commit 9a75a79edd
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: 6BE3B555EBC5982B

Datei anzeigen

@ -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
*