Paper/paper-server/nms-patches/ItemArmorStand.patch
CraftBukkit/Spigot a4b8e8ce68 Update to Minecraft 1.14.4
By: md_5 <git@md-5.net>
2019-07-20 09:00:00 +10:00

15 lines
1021 B
Diff

--- a/net/minecraft/server/ItemArmorStand.java
+++ b/net/minecraft/server/ItemArmorStand.java
@@ -41,6 +41,11 @@
entityarmorstand.setPositionRotation(d0 + 0.5D, d1, d2 + 0.5D, f, 0.0F);
this.a(entityarmorstand, world.random);
EntityTypes.a(world, itemactioncontext.getEntity(), (Entity) entityarmorstand, itemstack.getTag());
+ // CraftBukkit start
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPlaceEvent(itemactioncontext, entityarmorstand).isCancelled()) {
+ return EnumInteractionResult.FAIL;
+ }
+ // CraftBukkit end
world.addEntity(entityarmorstand);
world.playSound((EntityHuman) null, entityarmorstand.locX, entityarmorstand.locY, entityarmorstand.locZ, SoundEffects.ENTITY_ARMOR_STAND_PLACE, SoundCategory.BLOCKS, 0.75F, 0.8F);
}