--- a/net/minecraft/world/entity/decoration/EntityArmorStand.java
+++ b/net/minecraft/world/entity/decoration/EntityArmorStand.java
@@ -44,6 +44,15 @@
 import net.minecraft.world.phys.AxisAlignedBB;
 import net.minecraft.world.phys.Vec3D;
 
+// CraftBukkit start
+import org.bukkit.inventory.EquipmentSlot;
+import org.bukkit.craftbukkit.CraftEquipmentSlot;
+import org.bukkit.craftbukkit.inventory.CraftItemStack;
+import org.bukkit.entity.ArmorStand;
+import org.bukkit.entity.Player;
+import org.bukkit.event.player.PlayerArmorStandManipulateEvent;
+// CraftBukkit end
+
 public class EntityArmorStand extends EntityLiving {
 
     public static final int WOBBLE_TIME = 5;
@@ -106,6 +115,13 @@
         this.setPosition(d0, d1, d2);
     }
 
+    // CraftBukkit start - SPIGOT-3607, SPIGOT-3637
+    @Override
+    public float getBukkitYaw() {
+        return this.getYRot();
+    }
+    // CraftBukkit end
+
     @Override
     public void updateSize() {
         double d0 = this.locX();
@@ -161,14 +177,21 @@
 
     @Override
     public void setSlot(EnumItemSlot enumitemslot, ItemStack itemstack) {
+        // CraftBukkit start
+        this.setSlot(enumitemslot, itemstack, false);
+    }
+
+    @Override
+    public void setSlot(EnumItemSlot enumitemslot, ItemStack itemstack, boolean silent) {
+        // CraftBukkit end
         this.f(itemstack);
         switch (enumitemslot.a()) {
             case HAND:
-                this.playEquipSound(itemstack);
+                this.playEquipSound(itemstack, silent); // CraftBukkit
                 this.handItems.set(enumitemslot.b(), itemstack);
                 break;
             case ARMOR:
-                this.playEquipSound(itemstack);
+                this.playEquipSound(itemstack, silent); // CraftBukkit
                 this.armorItems.set(enumitemslot.b(), itemstack);
         }
 
@@ -405,6 +428,21 @@
             return false;
         } else {
             ItemStack itemstack2;
+            // CraftBukkit start
+            org.bukkit.inventory.ItemStack armorStandItem = CraftItemStack.asCraftMirror(itemstack1);
+            org.bukkit.inventory.ItemStack playerHeldItem = CraftItemStack.asCraftMirror(itemstack);
+
+            Player player = (Player) entityhuman.getBukkitEntity();
+            ArmorStand self = (ArmorStand) this.getBukkitEntity();
+
+            EquipmentSlot slot = CraftEquipmentSlot.getSlot(enumitemslot);
+            PlayerArmorStandManipulateEvent armorStandManipulateEvent = new PlayerArmorStandManipulateEvent(player,self,playerHeldItem,armorStandItem,slot);
+            this.level.getCraftServer().getPluginManager().callEvent(armorStandManipulateEvent);
+
+            if (armorStandManipulateEvent.isCancelled()) {
+                return true;
+            }
+            // CraftBukkit end
 
             if (entityhuman.getAbilities().instabuild && itemstack1.isEmpty() && !itemstack.isEmpty()) {
                 itemstack2 = itemstack.cloneItemStack();
@@ -433,9 +471,19 @@
     public boolean damageEntity(DamageSource damagesource, float f) {
         if (!this.level.isClientSide && !this.isRemoved()) {
             if (DamageSource.OUT_OF_WORLD.equals(damagesource)) {
+                // CraftBukkit start
+                if (org.bukkit.craftbukkit.event.CraftEventFactory.handleNonLivingEntityDamageEvent(this, damagesource, f)) {
+                    return false;
+                }
+                // CraftBukkit end
                 this.killEntity();
                 return false;
-            } else if (!this.isInvulnerable(damagesource) && !this.invisible && !this.isMarker()) {
+            } else if (!this.isInvulnerable(damagesource) && (true || !this.invisible) && !this.isMarker()) { // CraftBukkit
+                // CraftBukkit start
+                if (org.bukkit.craftbukkit.event.CraftEventFactory.handleNonLivingEntityDamageEvent(this, damagesource, f, true, this.invisible)) {
+                    return false;
+                }
+                // CraftBukkit end
                 if (damagesource.isExplosion()) {
                     this.h(damagesource);
                     this.killEntity();
@@ -475,7 +523,7 @@
                         } else {
                             this.g(damagesource);
                             this.G();
-                            this.killEntity();
+                            this.die(); // CraftBukkit - SPIGOT-4890: remain as this.die() since above damagesource method will call death event
                         }
 
                         return true;
@@ -536,13 +584,13 @@
     }
 
     private void g(DamageSource damagesource) {
-        Block.a(this.level, this.getChunkCoordinates(), new ItemStack(Items.ARMOR_STAND));
+        drops.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asBukkitCopy(new ItemStack(Items.ARMOR_STAND))); // CraftBukkit - add to drops
         this.h(damagesource);
     }
 
     private void h(DamageSource damagesource) {
         this.H();
-        this.f(damagesource);
+        // this.f(damagesource); // CraftBukkit - moved down
 
         ItemStack itemstack;
         int i;
@@ -550,7 +598,7 @@
         for (i = 0; i < this.handItems.size(); ++i) {
             itemstack = (ItemStack) this.handItems.get(i);
             if (!itemstack.isEmpty()) {
-                Block.a(this.level, this.getChunkCoordinates().up(), itemstack);
+                drops.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asBukkitCopy(itemstack)); // CraftBukkit - add to drops
                 this.handItems.set(i, ItemStack.EMPTY);
             }
         }
@@ -558,10 +606,11 @@
         for (i = 0; i < this.armorItems.size(); ++i) {
             itemstack = (ItemStack) this.armorItems.get(i);
             if (!itemstack.isEmpty()) {
-                Block.a(this.level, this.getChunkCoordinates().up(), itemstack);
+                drops.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asBukkitCopy(itemstack)); // CraftBukkit - add to drops
                 this.armorItems.set(i, ItemStack.EMPTY);
             }
         }
+        this.f(damagesource); // CraftBukkit - moved from above
 
     }
 
@@ -662,8 +711,16 @@
         return this.isSmall();
     }
 
+    // CraftBukkit start
+    @Override
+    protected boolean isDropExperience() {
+        return true; // MC-157395, SPIGOT-5193 even baby (small) armor stands should drop
+    }
+    // CraftBukkit end
+
     @Override
     public void killEntity() {
+        org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDeathEvent(this, drops); // CraftBukkit - call event
         this.a(Entity.RemovalReason.KILLED);
     }
 
