From 52faa415ef7764f9a61dea7b1bf8f350dba8180e Mon Sep 17 00:00:00 2001 From: Nathan Adams Date: Mon, 12 Dec 2011 19:44:14 +0000 Subject: [PATCH] Fixed clients not seeing EXP update immediately after using .setTotalExp and level methods --- src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index bb94842e8c..3c0893b468 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -497,6 +497,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void setLevel(int level) { getHandle().expLevel = level; + getHandle().cf = -1; } public int getTotalExperience() { @@ -505,6 +506,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void setTotalExperience(int exp) { getHandle().expTotal = exp; + getHandle().cf = -1; if (getTotalExperience() > getExperience()) { getHandle().expTotal = getTotalExperience();