From 95548945533d8572a7cb911b33c8ef4a823be49b Mon Sep 17 00:00:00 2001 From: Thinkofname Date: Fri, 25 Mar 2016 23:13:16 +0000 Subject: [PATCH] SPIGOT-2049: Send the right attributes when updating scaled health --- src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index 303da2d061..cf307e59c5 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -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(); }