@@ -6,7 +6,7 @@ Subject: [PATCH] Adds PlayerArmSwingEvent
6
6
7
7
diff --git a/src/main/java/io/papermc/paper/event/player/PlayerArmSwingEvent.java b/src/main/java/io/papermc/paper/event/player/PlayerArmSwingEvent.java
8
8
new file mode 100644
9
- index 0000000000000000000000000000000000000000..1a4550a73e89f9cf92d2831d21bcfb46f92fd189
9
+ index 0000000000000000000000000000000000000000..ce76b07cfaa9173c78e2844add2bc5bb437b1106
10
10
--- /dev/null
11
11
+++ b/src/main/java/io/papermc/paper/event/player/PlayerArmSwingEvent.java
12
12
@@ -0,0 +1,27 @@
@@ -23,7 +23,7 @@ index 0000000000000000000000000000000000000000..1a4550a73e89f9cf92d2831d21bcfb46
23
23
+ private final EquipmentSlot equipmentSlot;
24
24
+
25
25
+ public PlayerArmSwingEvent(@NotNull Player player, @NotNull EquipmentSlot equipmentSlot) {
26
- + super(player, PlayerAnimationType.ARM_SWING);
26
+ + super(player, equipmentSlot == EquipmentSlot.HAND ? PlayerAnimationType.ARM_SWING : PlayerAnimationType.OFF_ARM_SWING );
27
27
+ this.equipmentSlot = equipmentSlot;
28
28
+ }
29
29
+
@@ -38,7 +38,7 @@ index 0000000000000000000000000000000000000000..1a4550a73e89f9cf92d2831d21bcfb46
38
38
+ }
39
39
+ }
40
40
diff --git a/src/main/java/org/bukkit/event/player/PlayerAnimationEvent.java b/src/main/java/org/bukkit/event/player/PlayerAnimationEvent.java
41
- index b7ca545c3574d4639f2783f2367de871086a5704..e93bb1ed0fdb99b38ecb84eba99bf08f150f75f0 100644
41
+ index eb722a1e3b987b86fae2fa8346606fa15fada26f..11c27b1a4a749e129ed4b2d906c315d97a4b66e7 100644
42
42
--- a/src/main/java/org/bukkit/event/player/PlayerAnimationEvent.java
43
43
+++ b/src/main/java/org/bukkit/event/player/PlayerAnimationEvent.java
44
44
@@ -7,6 +7,7 @@ import org.jetbrains.annotations.NotNull;
@@ -49,17 +49,3 @@ index b7ca545c3574d4639f2783f2367de871086a5704..e93bb1ed0fdb99b38ecb84eba99bf08f
49
49
*/
50
50
public class PlayerAnimationEvent extends PlayerEvent implements Cancellable {
51
51
private static final HandlerList handlers = new HandlerList();
52
- @@ -24,6 +25,13 @@ public class PlayerAnimationEvent extends PlayerEvent implements Cancellable {
53
- animationType = playerAnimationType;
54
- }
55
-
56
- + // Paper start - readd old constructor
57
- + @Deprecated
58
- + public PlayerAnimationEvent(@NotNull final Player player) {
59
- + this(player, PlayerAnimationType.ARM_SWING);
60
- + }
61
- + // Paper end
62
- +
63
- /**
64
- * Get the type of this animation event
65
- *
0 commit comments