geforkt von Mirrors/Paper
Fixed clients not seeing EXP update immediately after using .setTotalExp and level methods
Dieser Commit ist enthalten in:
Ursprung
bd181fa04e
Commit
52faa415ef
@ -497,6 +497,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||||||
|
|
||||||
public void setLevel(int level) {
|
public void setLevel(int level) {
|
||||||
getHandle().expLevel = level;
|
getHandle().expLevel = level;
|
||||||
|
getHandle().cf = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
public int getTotalExperience() {
|
public int getTotalExperience() {
|
||||||
@ -505,6 +506,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||||||
|
|
||||||
public void setTotalExperience(int exp) {
|
public void setTotalExperience(int exp) {
|
||||||
getHandle().expTotal = exp;
|
getHandle().expTotal = exp;
|
||||||
|
getHandle().cf = -1;
|
||||||
|
|
||||||
if (getTotalExperience() > getExperience()) {
|
if (getTotalExperience() > getExperience()) {
|
||||||
getHandle().expTotal = getTotalExperience();
|
getHandle().expTotal = getTotalExperience();
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren