SPIGOT-5462: Cancelling EntitySpawnEvent takes Ender Eye from inventory
Dieser Commit ist enthalten in:
Ursprung
30a1b6911f
Commit
d31f05fbc6
15
nms-patches/ItemEnderEye.patch
Normale Datei
15
nms-patches/ItemEnderEye.patch
Normale Datei
@ -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);
|
||||
}
|
In neuem Issue referenzieren
Einen Benutzer sperren