13
0
geforkt von Mirrors/Paper

Fixed clients not seeing EXP update immediately after using .setTotalExp and level methods

By: Nathan Adams <dinnerbone@dinnerbone.com>
Dieser Commit ist enthalten in:
CraftBukkit/Spigot 2011-12-12 19:44:14 +00:00
Ursprung 586d6ad790
Commit d2ae4e1d75

Datei anzeigen

@ -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();