mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 11:06:29 +01:00
SPIGOT-3364: Correct EntityResurrectEvent
This commit is contained in:
parent
f3356f1074
commit
5e2a23055e
@ -344,12 +344,21 @@
|
||||
+ event.setCancelled(itemstack == null);
|
||||
+ this.world.getServer().getPluginManager().callEvent(event);
|
||||
+
|
||||
+ if (itemstack != null && !event.isCancelled()) {
|
||||
+ if (!event.isCancelled()) {
|
||||
+ itemstack1.subtract(1);
|
||||
+ // CraftBukkit end
|
||||
if (this instanceof EntityPlayer) {
|
||||
EntityPlayer entityplayer = (EntityPlayer) this;
|
||||
|
||||
@@ -859,7 +1009,7 @@
|
||||
this.world.broadcastEntityEffect(this, (byte) 35);
|
||||
}
|
||||
|
||||
- return itemstack != null;
|
||||
+ return !event.isCancelled();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -944,6 +1094,12 @@
|
||||
boolean flag = this.lastDamageByPlayerTime > 0;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user