diff options
author | Nathan Adams <dinnerbone@dinnerbone.com> | 2011-12-12 19:44:14 +0000 |
---|---|---|
committer | Nathan Adams <dinnerbone@dinnerbone.com> | 2011-12-12 19:44:57 +0000 |
commit | 52faa415ef7764f9a61dea7b1bf8f350dba8180e (patch) | |
tree | ae38da9cdd9ca02c423b0219037bd1ce8d0e1d46 /src/main/java | |
parent | bd181fa04e12a015e0f2388bc95fa16fc4c3f7cb (diff) | |
download | craftbukkit-52faa415ef7764f9a61dea7b1bf8f350dba8180e.tar craftbukkit-52faa415ef7764f9a61dea7b1bf8f350dba8180e.tar.gz craftbukkit-52faa415ef7764f9a61dea7b1bf8f350dba8180e.tar.lz craftbukkit-52faa415ef7764f9a61dea7b1bf8f350dba8180e.tar.xz craftbukkit-52faa415ef7764f9a61dea7b1bf8f350dba8180e.zip |
Fixed clients not seeing EXP update immediately after using .setTotalExp and level methods
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java index bb94842e..3c0893b4 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(); |