13
0
geforkt von Mirrors/Paper

SPIGOT-2049: Send the right attributes when updating scaled health

By: Thinkofname <thinkofdeath@spigotmc.org>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2016-03-25 23:13:16 +00:00
Ursprung 2e5cc5e318
Commit 3c7782562d

Datei anzeigen

@ -1281,7 +1281,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
public void updateScaledHealth() {
AttributeMapServer attributemapserver = (AttributeMapServer) getHandle().getAttributeMap();
Set set = attributemapserver.getAttributes();
Collection set = attributemapserver.c(); // PAIL: Rename
injectScaledMaxHealth(set, true);
@ -1289,7 +1289,6 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
getHandle().playerConnection.sendPacket(new PacketPlayOutUpdateHealth(getScaledHealth(), getHandle().getFoodData().getFoodLevel(), getHandle().getFoodData().getSaturationLevel()));
getHandle().playerConnection.sendPacket(new PacketPlayOutUpdateAttributes(getHandle().getId(), set));
set.clear();
getHandle().maxHealthCache = getMaxHealth();
}