mirror of
https://github.com/PaperMC/Paper.git
synced 2025-01-09 19:49:35 +01:00
SPIGOT-1811: Death message not shown on respawn screen
By: md_5 <git@md-5.net>
This commit is contained in:
parent
6b0b34838e
commit
b9c01d1768
2 changed files with 8 additions and 2 deletions
|
@ -368,7 +368,7 @@
|
|||
+ player.setRealHealth(f);
|
||||
+ }
|
||||
+
|
||||
+ player.updateScaledHealth();
|
||||
+ player.updateScaledHealth(false);
|
||||
+ return;
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
|
|
@ -1467,6 +1467,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||
}
|
||||
|
||||
public void updateScaledHealth() {
|
||||
updateScaledHealth(true);
|
||||
}
|
||||
|
||||
public void updateScaledHealth(boolean sendHealth) {
|
||||
AttributeMapServer attributemapserver = (AttributeMapServer) getHandle().getAttributeMap();
|
||||
Collection<AttributeInstance> set = attributemapserver.c(); // PAIL: Rename
|
||||
|
||||
|
@ -1475,7 +1479,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||
// SPIGOT-3813: Attributes before health
|
||||
if (getHandle().playerConnection != null) {
|
||||
getHandle().playerConnection.sendPacket(new PacketPlayOutUpdateAttributes(getHandle().getId(), set));
|
||||
sendHealthUpdate();
|
||||
if (sendHealth) {
|
||||
sendHealthUpdate();
|
||||
}
|
||||
}
|
||||
getHandle().getDataWatcher().set(EntityLiving.HEALTH, (float) getScaledHealth());
|
||||
|
||||
|
|
Loading…
Reference in a new issue