mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-10 22:05:10 +01:00
SPIGOT-7003: Add missing PlayerAnimationType
By: Doc <nachito94@msn.com>
This commit is contained in:
parent
c67855f651
commit
79086ef520
@ -11,7 +11,6 @@
|
||||
+import net.minecraft.network.protocol.game.PacketPlayOutEntityMetadata;
|
||||
+import net.minecraft.network.protocol.game.PacketPlayOutSpawnEntity;
|
||||
+import net.minecraft.network.protocol.game.PacketPlayOutSpawnPosition;
|
||||
+import net.minecraft.util.MathHelper;
|
||||
+import net.minecraft.world.entity.EntityInsentient;
|
||||
+import net.minecraft.world.entity.animal.Bucketable;
|
||||
+import net.minecraft.world.entity.EntityLiving;
|
||||
@ -41,6 +40,7 @@
|
||||
+import org.bukkit.event.inventory.SmithItemEvent;
|
||||
+import org.bukkit.event.player.AsyncPlayerChatEvent;
|
||||
+import org.bukkit.event.player.PlayerAnimationEvent;
|
||||
+import org.bukkit.event.player.PlayerAnimationType;
|
||||
+import org.bukkit.event.player.PlayerChatEvent;
|
||||
+import org.bukkit.event.player.PlayerCommandPreprocessEvent;
|
||||
+import org.bukkit.event.player.PlayerInteractAtEntityEvent;
|
||||
@ -1158,7 +1158,7 @@
|
||||
+ }
|
||||
+
|
||||
+ // Arm swing animation
|
||||
+ PlayerAnimationEvent event = new PlayerAnimationEvent(this.getCraftPlayer());
|
||||
+ PlayerAnimationEvent event = new PlayerAnimationEvent(this.getCraftPlayer(), (packetplayinarmanimation.getHand() == EnumHand.MAIN_HAND) ? PlayerAnimationType.ARM_SWING : PlayerAnimationType.OFF_ARM_SWING);
|
||||
+ this.cserver.getPluginManager().callEvent(event);
|
||||
+
|
||||
+ if (event.isCancelled()) return;
|
||||
|
Loading…
Reference in New Issue
Block a user