PaperMC/paper-server/nms-patches/net/minecraft/world/item/ItemEndCrystal.patch
CraftBukkit/Spigot 9da047989c Repackage NMS
By: md_5 <git@md-5.net>
2021-03-16 09:00:00 +11:00

14 lines
816 B
Diff

--- a/net/minecraft/world/item/ItemEndCrystal.java
+++ b/net/minecraft/world/item/ItemEndCrystal.java
@@ -45,6 +45,11 @@
EntityEnderCrystal entityendercrystal = new EntityEnderCrystal(world, d0 + 0.5D, d1, d2 + 0.5D);
entityendercrystal.setShowingBottom(false);
+ // CraftBukkit start
+ if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPlaceEvent(itemactioncontext, entityendercrystal).isCancelled()) {
+ return EnumInteractionResult.FAIL;
+ }
+ // CraftBukkit end
world.addEntity(entityendercrystal);
EnderDragonBattle enderdragonbattle = ((WorldServer) world).getDragonBattle();