mirror of
https://github.com/PaperMC/Paper.git
synced 2025-02-15 20:12:09 +01:00
Properly validate player experience bar progress
By: Parker Hawke <hawkeboyz2@hotmail.com>
This commit is contained in:
parent
49200e382f
commit
3d517d9d80
@ -821,6 +821,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setExp(float exp) {
|
public void setExp(float exp) {
|
||||||
|
Preconditions.checkArgument(exp >= 0.0 && exp <= 1.0, "Experience progress must be between 0.0 and 1.0 (%s)", exp);
|
||||||
getHandle().exp = exp;
|
getHandle().exp = exp;
|
||||||
getHandle().lastSentExp = -1;
|
getHandle().lastSentExp = -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user