13
0
geforkt von Mirrors/Paper
Paper/paper-server/nms-patches/net/minecraft/world/item/ItemEndCrystal.patch
CraftBukkit/Spigot b3a8254758 Update to Minecraft 1.17
By: md_5 <git@md-5.net>
2021-06-11 15:00:00 +10:00

15 Zeilen
928 B
Diff

--- a/net/minecraft/world/item/ItemEndCrystal.java
+++ b/net/minecraft/world/item/ItemEndCrystal.java
@@ -46,6 +46,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);
world.a((Entity) itemactioncontext.getEntity(), GameEvent.ENTITY_PLACE, blockposition1);
EnderDragonBattle enderdragonbattle = ((WorldServer) world).getDragonBattle();