3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-27 08:30:06 +01:00
Paper/nms-patches/ItemEndCrystal.patch

15 Zeilen
901 B
Diff

2018-10-22 21:00:00 +02:00
--- a/net/minecraft/server/ItemEndCrystal.java
+++ b/net/minecraft/server/ItemEndCrystal.java
2019-04-23 04:00:00 +02:00
@@ -34,6 +34,11 @@
2018-10-22 21:00:00 +02:00
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);
if (world.worldProvider instanceof WorldProviderTheEnd) {
2019-04-23 04:00:00 +02:00
EnderDragonBattle enderdragonbattle = ((WorldProviderTheEnd) world.worldProvider).q();