mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-29 03:32:46 +01:00
Properly validate player experience bar progress
This commit is contained in:
parent
dfee3d9f9f
commit
b80055abfb
1 changed files with 1 additions and 0 deletions
|
@ -821,6 +821,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
|||
|
||||
@Override
|
||||
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().lastSentExp = -1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue