summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorNathan Adams <dinnerbone@dinnerbone.com>2011-12-12 19:44:14 +0000
committerNathan Adams <dinnerbone@dinnerbone.com>2011-12-12 19:44:57 +0000
commit52faa415ef7764f9a61dea7b1bf8f350dba8180e (patch)
treeae38da9cdd9ca02c423b0219037bd1ce8d0e1d46 /src/main/java
parentbd181fa04e12a015e0f2388bc95fa16fc4c3f7cb (diff)
downloadcraftbukkit-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.java2
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();