mirror of
https://github.com/PaperMC/Paper.git
synced 2025-03-19 05:31:32 +01:00
SPIGOT-3364: Correct EntityResurrectEvent
By: md_5 <git@md-5.net>
This commit is contained in:
parent
e97c71d131
commit
d3b6e87d27
1 changed files with 10 additions and 1 deletions
|
@ -344,12 +344,21 @@
|
||||||
+ event.setCancelled(itemstack == null);
|
+ event.setCancelled(itemstack == null);
|
||||||
+ this.world.getServer().getPluginManager().callEvent(event);
|
+ this.world.getServer().getPluginManager().callEvent(event);
|
||||||
+
|
+
|
||||||
+ if (itemstack != null && !event.isCancelled()) {
|
+ if (!event.isCancelled()) {
|
||||||
+ itemstack1.subtract(1);
|
+ itemstack1.subtract(1);
|
||||||
+ // CraftBukkit end
|
+ // CraftBukkit end
|
||||||
if (this instanceof EntityPlayer) {
|
if (this instanceof EntityPlayer) {
|
||||||
EntityPlayer entityplayer = (EntityPlayer) this;
|
EntityPlayer entityplayer = (EntityPlayer) this;
|
||||||
|
|
||||||
|
@@ -859,7 +1009,7 @@
|
||||||
|
this.world.broadcastEntityEffect(this, (byte) 35);
|
||||||
|
}
|
||||||
|
|
||||||
|
- return itemstack != null;
|
||||||
|
+ return !event.isCancelled();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -944,6 +1094,12 @@
|
@@ -944,6 +1094,12 @@
|
||||||
boolean flag = this.lastDamageByPlayerTime > 0;
|
boolean flag = this.lastDamageByPlayerTime > 0;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue