3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-12-15 19:10:09 +01:00

SPIGOT-1811: Death message not shown on respawn screen

Dieser Commit ist enthalten in:
md_5 2018-12-27 11:37:19 +11:00
Ursprung b4a4f15dbf
Commit 79ded7a8ca
2 geänderte Dateien mit 8 neuen und 2 gelöschten Zeilen

Datei anzeigen

@ -368,7 +368,7 @@
+ player.setRealHealth(f); + player.setRealHealth(f);
+ } + }
+ +
+ player.updateScaledHealth(); + player.updateScaledHealth(false);
+ return; + return;
+ } + }
+ // CraftBukkit end + // CraftBukkit end

Datei anzeigen

@ -1467,6 +1467,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
} }
public void updateScaledHealth() { public void updateScaledHealth() {
updateScaledHealth(true);
}
public void updateScaledHealth(boolean sendHealth) {
AttributeMapServer attributemapserver = (AttributeMapServer) getHandle().getAttributeMap(); AttributeMapServer attributemapserver = (AttributeMapServer) getHandle().getAttributeMap();
Collection<AttributeInstance> set = attributemapserver.c(); // PAIL: Rename Collection<AttributeInstance> set = attributemapserver.c(); // PAIL: Rename
@ -1475,8 +1479,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
// SPIGOT-3813: Attributes before health // SPIGOT-3813: Attributes before health
if (getHandle().playerConnection != null) { if (getHandle().playerConnection != null) {
getHandle().playerConnection.sendPacket(new PacketPlayOutUpdateAttributes(getHandle().getId(), set)); getHandle().playerConnection.sendPacket(new PacketPlayOutUpdateAttributes(getHandle().getId(), set));
if (sendHealth) {
sendHealthUpdate(); sendHealthUpdate();
} }
}
getHandle().getDataWatcher().set(EntityLiving.HEALTH, (float) getScaledHealth()); getHandle().getDataWatcher().set(EntityLiving.HEALTH, (float) getScaledHealth());
getHandle().maxHealthCache = getMaxHealth(); getHandle().maxHealthCache = getMaxHealth();