mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 11:44:19 +01:00
43702a9e10
By: md_5 <git@md-5.net>
14 lines
1 KiB
Diff
14 lines
1 KiB
Diff
--- a/net/minecraft/world/item/ItemArmorStand.java
|
|
+++ b/net/minecraft/world/item/ItemArmorStand.java
|
|
@@ -55,6 +55,11 @@
|
|
|
|
entityarmorstand.moveTo(entityarmorstand.getX(), entityarmorstand.getY(), entityarmorstand.getZ(), f, 0.0F);
|
|
this.randomizePose(entityarmorstand, world.random);
|
|
+ // CraftBukkit start
|
|
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPlaceEvent(itemactioncontext, entityarmorstand).isCancelled()) {
|
|
+ return EnumInteractionResult.FAIL;
|
|
+ }
|
|
+ // CraftBukkit end
|
|
worldserver.addFreshEntityWithPassengers(entityarmorstand);
|
|
world.playSound((EntityHuman) null, entityarmorstand.getX(), entityarmorstand.getY(), entityarmorstand.getZ(), SoundEffects.ARMOR_STAND_PLACE, SoundCategory.BLOCKS, 0.75F, 0.8F);
|
|
world.gameEvent(itemactioncontext.getPlayer(), GameEvent.ENTITY_PLACE, (Entity) entityarmorstand);
|