Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-12-18 04:20:08 +01:00
SPIGOT-3869: More resurrect fixes
Dieser Commit ist enthalten in:
Ursprung
3fed09cc42
Commit
aa255689c1
@ -326,7 +326,7 @@
|
|||||||
this.aA = 0.0F;
|
this.aA = 0.0F;
|
||||||
Entity entity1 = damagesource.getEntity();
|
Entity entity1 = damagesource.getEntity();
|
||||||
|
|
||||||
@@ -833,18 +981,28 @@
|
@@ -833,19 +981,29 @@
|
||||||
EnumHand[] aenumhand = EnumHand.values();
|
EnumHand[] aenumhand = EnumHand.values();
|
||||||
int i = aenumhand.length;
|
int i = aenumhand.length;
|
||||||
|
|
||||||
@ -346,6 +346,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
- if (itemstack != null) {
|
- if (itemstack != null) {
|
||||||
|
- if (this instanceof EntityPlayer) {
|
||||||
+ EntityResurrectEvent event = new EntityResurrectEvent((LivingEntity) this.getBukkitEntity());
|
+ EntityResurrectEvent event = new EntityResurrectEvent((LivingEntity) this.getBukkitEntity());
|
||||||
+ event.setCancelled(itemstack == null);
|
+ event.setCancelled(itemstack == null);
|
||||||
+ this.world.getServer().getPluginManager().callEvent(event);
|
+ this.world.getServer().getPluginManager().callEvent(event);
|
||||||
@ -354,10 +355,11 @@
|
|||||||
+ if (!itemstack1.isEmpty()) {
|
+ if (!itemstack1.isEmpty()) {
|
||||||
+ itemstack1.subtract(1);
|
+ itemstack1.subtract(1);
|
||||||
+ }
|
+ }
|
||||||
+ // CraftBukkit end
|
+ if (itemstack != null && this instanceof EntityPlayer) {
|
||||||
if (this instanceof EntityPlayer) {
|
+ // CraftBukkit end
|
||||||
EntityPlayer entityplayer = (EntityPlayer) this;
|
EntityPlayer entityplayer = (EntityPlayer) this;
|
||||||
|
|
||||||
|
entityplayer.b(StatisticList.b(Items.cY));
|
||||||
@@ -859,7 +1017,7 @@
|
@@ -859,7 +1017,7 @@
|
||||||
this.world.broadcastEntityEffect(this, (byte) 35);
|
this.world.broadcastEntityEffect(this, (byte) 35);
|
||||||
}
|
}
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren