mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-22 17:07:34 +01:00
SPIGOT-5462: Cancelling EntitySpawnEvent takes Ender Eye from inventory
This commit is contained in:
parent
30a1b6911f
commit
d31f05fbc6
15
nms-patches/ItemEnderEye.patch
Normal file
15
nms-patches/ItemEnderEye.patch
Normal file
@ -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);
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user