aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0629-Adds-PlayerArmSwingEvent.patch
diff options
context:
space:
mode:
authorJake Potrebic <[email protected]>2023-11-04 14:11:55 -0700
committerGitHub <[email protected]>2023-11-04 14:11:55 -0700
commit0cdce89d595a2c1c097c9e2a5ff96687977b3b25 (patch)
treede63d6aa8112811f93b5d6afebbb069b9980870f /patches/server/0629-Adds-PlayerArmSwingEvent.patch
parent15a0de2eefb70ea8162cbb31056920adf80265fa (diff)
downloadPaper-0cdce89d595a2c1c097c9e2a5ff96687977b3b25.tar.gz
Paper-0cdce89d595a2c1c097c9e2a5ff96687977b3b25.zip
Fix a bunch of stuff with player spawn locations (#9887)
If a playerdata doesn't contain a valid, loaded world, reset to the main world spawn point
Diffstat (limited to 'patches/server/0629-Adds-PlayerArmSwingEvent.patch')
-rw-r--r--patches/server/0629-Adds-PlayerArmSwingEvent.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/patches/server/0629-Adds-PlayerArmSwingEvent.patch b/patches/server/0629-Adds-PlayerArmSwingEvent.patch
new file mode 100644
index 0000000000..5aef5fc4e8
--- /dev/null
+++ b/patches/server/0629-Adds-PlayerArmSwingEvent.patch
@@ -0,0 +1,19 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Jake Potrebic <[email protected]>
+Date: Fri, 12 Mar 2021 19:22:21 -0800
+Subject: [PATCH] Adds PlayerArmSwingEvent
+
+
+diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+index a1de622805f31e6de771b62cce94ad78dd8a526f..c38d6ff1c4b22833ce8c99ec420741659becf4d2 100644
+--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
++++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+@@ -2317,7 +2317,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
+ } // Paper end
+
+ // Arm swing animation
+- PlayerAnimationEvent event = new PlayerAnimationEvent(this.getCraftPlayer(), (packet.getHand() == InteractionHand.MAIN_HAND) ? PlayerAnimationType.ARM_SWING : PlayerAnimationType.OFF_ARM_SWING);
++ io.papermc.paper.event.player.PlayerArmSwingEvent event = new io.papermc.paper.event.player.PlayerArmSwingEvent(this.getCraftPlayer(), packet.getHand() == InteractionHand.MAIN_HAND ? org.bukkit.inventory.EquipmentSlot.HAND : org.bukkit.inventory.EquipmentSlot.OFF_HAND); // Paper
+ this.cserver.getPluginManager().callEvent(event);
+
+ if (event.isCancelled()) return;