Archiviert
13
0

SPIGOT-5462: Cancelling EntitySpawnEvent takes Ender Eye from inventory

Dieser Commit ist enthalten in:
md_5 2019-12-18 13:07:14 +11:00
Ursprung 30a1b6911f
Commit d31f05fbc6

Datei anzeigen

@ -0,0 +1,15 @@
--- a/net/minecraft/server/ItemEnderEye.java
+++ b/net/minecraft/server/ItemEnderEye.java
@@ -61,7 +61,11 @@
entityendersignal.b(itemstack);
entityendersignal.a(blockposition);
- world.addEntity(entityendersignal);
+ // CraftBukkit start
+ if (!world.addEntity(entityendersignal)) {
+ return new InteractionResultWrapper(EnumInteractionResult.FAIL, itemstack);
+ }
+ // CraftBukkit end
if (entityhuman instanceof EntityPlayer) {
CriterionTriggers.m.a((EntityPlayer) entityhuman, blockposition);
}